mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-12-08 00:00:12 +03:00
Merge pull request #451 from mmlb/push-szykyztyxswv
Some checks failed
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / reprotest (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Some checks failed
build / bcachefs-tools-msrv (push) Has been cancelled
.deb build orchestrator / source-only (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:forky], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:trixie], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:amd64 host-arch:ppc64el machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:debian version:unstable], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:plucky], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[build-arch:amd64 host-arch:amd64 machine-arch:amd64 runs-on:ubuntu-24.04]) (push) Has been cancelled
.deb build orchestrator / buildd (map[name:ubuntu version:questing], map[build-arch:arm64 host-arch:arm64 machine-arch:arm64 runs-on:ubuntu-24.04-arm]) (push) Has been cancelled
.deb build orchestrator / reprotest (push) Has been cancelled
.deb build orchestrator / publish (push) Has been cancelled
Nix Flake actions / nix-matrix (push) Has been cancelled
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Has been cancelled
Bunch of -h/--help related fixess to c_src based cmds
This commit is contained in:
commit
d72b17aa09
@ -126,9 +126,10 @@ static void setattr_usage(void)
|
||||
"Options:");
|
||||
|
||||
bch2_opts_usage(OPT_INODE);
|
||||
puts(" --remove-all Remove all file options\n"
|
||||
" To remove specific options, use: --option=-\n"
|
||||
" -h Display this help and exit\n"
|
||||
puts(" --remove-all Remove all file options\n"
|
||||
" To remove specific options, use: --option=-\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -138,6 +139,14 @@ int cmd_setattr(int argc, char *argv[])
|
||||
bool remove_all = false;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strcmp(argv[i], "--help") == 0) {
|
||||
setattr_usage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (strcmp(argv[i], "-h") == 0) {
|
||||
setattr_usage();
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
if (strcmp(argv[i], "--remove-all") == 0) {
|
||||
remove_all = true;
|
||||
bch_remove_arg_from_argv(&argc, argv, i);
|
||||
|
||||
@ -11,6 +11,7 @@ static void reset_counters_usage(void)
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -18,7 +19,7 @@ static void reset_counters_usage(void)
|
||||
int cmd_reset_counters(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
int opt;
|
||||
|
||||
@ -19,7 +19,8 @@ static void data_rereplicate_usage(void)
|
||||
"of any degraded data\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -27,7 +28,7 @@ static void data_rereplicate_usage(void)
|
||||
static int cmd_data_rereplicate(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
int opt;
|
||||
@ -63,8 +64,9 @@ static void data_scrub_usage(void)
|
||||
"Check data for errors, fix from another replica if possible\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -m, --metadata check metadata only\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -m, --metadata Check metadata only\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -271,10 +273,11 @@ static void data_job_usage(void)
|
||||
"job: one of scrub, rereplicate, migrate, rewrite_old_nodes, or drop_extra_replicas\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -b, --btree btree btree to operate on\n"
|
||||
" -s, --start inode:offset start position\n"
|
||||
" -e, --end inode:offset end position\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -b, --btree btree Btree to operate on\n"
|
||||
" -s, --start inode:offset Start position\n"
|
||||
" -e, --end inode:offset End position\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -339,8 +342,9 @@ static int data_usage(void)
|
||||
"Usage: bcachefs data <CMD> [OPTIONS]\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" rereplicate Rereplicate degraded data\n"
|
||||
" job Kick off low level data jobs\n"
|
||||
" rereplicate Rereplicate degraded data\n"
|
||||
" scrub Verify checksums and correct errors, if possible\n"
|
||||
" job Kick off low level data jobs\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
return 0;
|
||||
|
||||
@ -39,9 +39,9 @@ static void device_add_usage(void)
|
||||
|
||||
bch2_opts_usage(OPT_FORMAT|OPT_DEVICE);
|
||||
|
||||
puts(" -l, --label=label Disk label\n"
|
||||
" -f, --force Use device even if it appears to already be formatted\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
puts(" -l, --label=label Disk label\n"
|
||||
" -f, --force Use device even if it appears to already be formatted\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -140,11 +140,10 @@ static void device_remove_usage(void)
|
||||
" bcachefs device remove <device>|<devid> <path>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force Force removal, even if some data\n"
|
||||
" couldn't be migrated\n"
|
||||
" -F, --force-metadata Force removal, even if some metadata\n"
|
||||
" couldn't be migrated\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -f, --force Force removal, even if some data couldn't be migrated\n"
|
||||
" -F, --force-metadata Force removal, even if some metadata couldn't be migrated\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -152,10 +151,10 @@ static void device_remove_usage(void)
|
||||
static int cmd_device_remove(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "by-id", 0, NULL, 'i' },
|
||||
{ "force", 0, NULL, 'f' },
|
||||
{ "force-metadata", 0, NULL, 'F' },
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "by-id", no_argument, NULL, 'i' },
|
||||
{ "force", no_argument, NULL, 'f' },
|
||||
{ "force-metadata", no_argument, NULL, 'F' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
struct bchfs_handle fs;
|
||||
@ -210,7 +209,7 @@ static void device_online_usage(void)
|
||||
"Usage: bcachefs device online [OPTION]... device\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -218,7 +217,7 @@ static void device_online_usage(void)
|
||||
static int cmd_device_online(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
int opt;
|
||||
@ -250,8 +249,8 @@ static void device_offline_usage(void)
|
||||
"Usage: bcachefs device offline [OPTION]... device\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force Force, if data redundancy will be degraded\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -f, --force Force, if data redundancy will be degraded\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -259,7 +258,8 @@ static void device_offline_usage(void)
|
||||
static int cmd_device_offline(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "force", 0, NULL, 'f' },
|
||||
{ "force", no_argument, NULL, 'f' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
int opt, flags = 0;
|
||||
@ -295,8 +295,8 @@ static void device_evacuate_usage(void)
|
||||
"Usage: bcachefs device evacuate [OPTION]... device\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force Force if data redundancy will be degraded\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -f, --force Force if data redundancy will be degraded\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -359,10 +359,11 @@ static void device_set_state_usage(void)
|
||||
"<path>: path to mounted filesystem, optional unless specifying device by id\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force Force if data redundancy will be degraded\n"
|
||||
" --force-if-data-lost Force if data will be lost\n"
|
||||
" -o, --offline Set state of an offline device\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -f, --force Force if data redundancy will be degraded\n"
|
||||
" --force-if-data-lost Force if data will be lost\n"
|
||||
" -o, --offline Set state of an offline device\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -466,7 +467,8 @@ static void device_resize_usage(void)
|
||||
"Usage: bcachefs device resize device [ size ]\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -474,7 +476,7 @@ static void device_resize_usage(void)
|
||||
static int cmd_device_resize(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
u64 size;
|
||||
@ -573,7 +575,8 @@ static void device_resize_journal_usage(void)
|
||||
"Usage: bcachefs device resize-journal device size\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -581,7 +584,7 @@ static void device_resize_journal_usage(void)
|
||||
static int cmd_device_resize_journal(int argc, char *argv[])
|
||||
{
|
||||
static const struct option longopts[] = {
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
u64 size;
|
||||
@ -671,14 +674,14 @@ static int device_usage(void)
|
||||
"Usage: bcachefs device <CMD> [OPTION]\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" add add a new device to an existing filesystem\n"
|
||||
" remove remove a device from an existing filesystem\n"
|
||||
" online re-add an existing member to a filesystem\n"
|
||||
" offline take a device offline, without removing it\n"
|
||||
" evacuate migrate data off a specific device\n"
|
||||
" set-state mark a device as failed\n"
|
||||
" resize resize filesystem on a device\n"
|
||||
" resize-journal resize journal on a device\n"
|
||||
" add Add a new device to an existing filesystem\n"
|
||||
" remove Remove a device from an existing filesystem\n"
|
||||
" online Re-add an existing member to a filesystem\n"
|
||||
" offline Take a device offline, without removing it\n"
|
||||
" evacuate Migrate data off a specific device\n"
|
||||
" set-state Mark a device as failed\n"
|
||||
" resize Resize filesystem on a device\n"
|
||||
" resize-journal Resize journal on a device\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
return 0;
|
||||
|
||||
@ -313,13 +313,14 @@ static void dump_usage(void)
|
||||
"Usage: bcachefs dump [OPTION]... <devices>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -o output Output qcow2 image(s)\n"
|
||||
" -f, --force Force; overwrite when needed\n"
|
||||
" -s, --sanitize Zero out inline data extents\n"
|
||||
" --nojournal Don't dump entire journal, just dirty entries\n"
|
||||
" --noexcl Open devices with O_NOEXCL (not recommended)\n"
|
||||
" -o output Output qcow2 image(s)\n"
|
||||
" -f, --force Force; overwrite when needed\n"
|
||||
" -s, --sanitize Zero out inline data extents\n"
|
||||
" --nojournal Don't dump entire journal, just dirty entries\n"
|
||||
" --noexcl Open devices with O_NOEXCL (not recommended)\n"
|
||||
" -v, --verbose\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -398,8 +399,9 @@ static void undump_usage(void)
|
||||
"Usage: bcachefs undump [OPTION]... <files>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --force Force; overwrite when needed\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -f, --force Force; overwrite when needed\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -61,27 +61,27 @@ static void format_usage(void)
|
||||
|
||||
bch2_opts_usage(OPT_FORMAT|OPT_FS);
|
||||
|
||||
puts(" --replicas=# Sets both data and metadata replicas\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" --passphrase_file=file File containing passphrase used for encryption/decryption\n"
|
||||
" --no_passphrase Don't encrypt master encryption key\n"
|
||||
puts(" --replicas=# Sets both data and metadata replicas\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" --passphrase_file=file File containing passphrase used for encryption/decryption\n"
|
||||
" --no_passphrase Don't encrypt master encryption key\n"
|
||||
" -L, --fs_label=label\n"
|
||||
" -U, --uuid=uuid\n"
|
||||
" --superblock_size=size\n"
|
||||
" --version=version Create filesystem with specified on disk format version instead of the latest\n"
|
||||
" --source=path Initialize the bcachefs filesystem from this root directory\n"
|
||||
" --version=version Create filesystem with specified on disk format version instead of the latest\n"
|
||||
" --source=path Initialize the bcachefs filesystem from this root directory\n"
|
||||
"\n"
|
||||
"Device specific options:");
|
||||
|
||||
bch2_opts_usage(OPT_FORMAT|OPT_DEVICE);
|
||||
|
||||
puts(" --fs_size=size Size of filesystem on device\n"
|
||||
" -l, --label=label Disk label\n"
|
||||
puts(" --fs_size=size Size of filesystem on device\n"
|
||||
" -l, --label=label Disk label\n"
|
||||
"\n"
|
||||
" -f, --force\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Device specific options must come before corresponding devices, e.g.\n"
|
||||
" bcachefs format --label cache /dev/sdb /dev/sdc\n"
|
||||
|
||||
@ -597,11 +597,12 @@ static void fs_usage_usage(void)
|
||||
"Usage: bcachefs fs usage [OPTION]... <mountpoint>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f, --fields=FIELDS List of accounting sections to print\n"
|
||||
" replicas,btree,compression,rebalance_work,devices\n"
|
||||
" -a Print all accounting fields\n"
|
||||
" -h, --human-readable Human readable units\n"
|
||||
" -H, --help Display this help and exit\n"
|
||||
" -f, --fields=FIELDS List of accounting sections to print:\n"
|
||||
" replicas, btree, compression, rebalance_work, devices\n"
|
||||
" -a Print all accounting fields\n"
|
||||
" -h, --human-readable Human readable units\n"
|
||||
" -H, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -664,8 +665,8 @@ int fs_usage(void)
|
||||
"Usage: bcachefs fs <CMD> [OPTIONS]\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" usage Display detailed filesystem usage\n"
|
||||
" top Show runtime performance information\n"
|
||||
" usage Display detailed filesystem usage\n"
|
||||
" top Show runtime performance information\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
return 0;
|
||||
|
||||
@ -204,15 +204,16 @@ static void fsck_usage(void)
|
||||
"Usage: bcachefs fsck [OPTION]... <devices>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -p Automatic repair (no questions)\n"
|
||||
" -n Don't repair, only check for errors\n"
|
||||
" -y Assume \"yes\" to all questions\n"
|
||||
" -f Force checking even if filesystem is marked clean\n"
|
||||
" -r, --ratelimit_errors Don't display more than 10 errors of a given type\n"
|
||||
" -k, --kernel Use the in-kernel fsck implementation\n"
|
||||
" -p Automatic repair (no questions)\n"
|
||||
" -n Don't repair, only check for errors\n"
|
||||
" -y Assume \"yes\" to all questions\n"
|
||||
" -f Force checking even if filesystem is marked clean\n"
|
||||
" -r, --ratelimit_errors Don't display more than 10 errors of a given type\n"
|
||||
" -k, --kernel Use the in-kernel fsck implementation\n"
|
||||
" -K, --no-kernel\n"
|
||||
" -v Be verbose\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -v Be verbose\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -383,9 +384,10 @@ static void recovery_pass_usage(void)
|
||||
"Currently only supports unmounted/offline filesystems\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -s, --set Schedule a recovery pass in the superblock\n"
|
||||
" -u, --unset Deschedule a recovery pass\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -s, --set Schedule a recovery pass in the superblock\n"
|
||||
" -u, --unset Deschedule a recovery pass\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -503,20 +503,20 @@ static void image_create_usage(void)
|
||||
"Usage: bcachefs image create [OPTION]... <file>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" --source=path Source directory to be used as content for the new image\n"
|
||||
" -a, --keep-alloc Include allocation info in the filesystem\n"
|
||||
" 6.16+ regenerates alloc info on first rw mount\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" --source=path Source directory to be used as content for the new image\n"
|
||||
" -a, --keep-alloc Include allocation info in the filesystem\n"
|
||||
" 6.16+ regenerates alloc info on first rw mount\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" -L, --fs_label=label\n"
|
||||
" -U, --uuid=uuid\n"
|
||||
" --superblock_size=size\n"
|
||||
" --bucket_size=size\n"
|
||||
" --fs_size=size Expected size of device image will be used on, hint for bucket size\n"
|
||||
" --version=version Create filesystem with specified on disk format version instead of the latest\n"
|
||||
" --fs_size=size Expected size of device image will be used on, hint for bucket size\n"
|
||||
" --version=version Create filesystem with specified on disk format version instead of the latest\n"
|
||||
" -f, --force\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -746,12 +746,12 @@ static void image_update_usage(void)
|
||||
"Usage: bcachefs image update [OPTION]... <file>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" --source=path Source directory to be used as content for the new image\n"
|
||||
" -a, --keep-alloc Include allocation info in the filesystem\n"
|
||||
" 6.16+ regenerates alloc info on first rw mount\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" --source=path Source directory to be used as content for the new image\n"
|
||||
" -a, --keep-alloc Include allocation info in the filesystem\n"
|
||||
" 6.16+ regenerates alloc info on first rw mount\n"
|
||||
" -q, --quiet Only print errors\n"
|
||||
" -v, --verbose Verbose filesystem initialization\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
@ -809,8 +809,8 @@ static int image_usage(void)
|
||||
"Usage: bcachefs image <CMD> [OPTION]...\n"
|
||||
"\n"
|
||||
"Commands:\n"
|
||||
" create Create a minimally-sized disk image\n"
|
||||
" update Update a disk image, minimizing changes\n"
|
||||
" create Create a minimally-sized disk image\n"
|
||||
" update Update a disk image, minimizing changes\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
return 0;
|
||||
|
||||
@ -23,6 +23,7 @@ static void unlock_usage(void)
|
||||
" Keyring to add to (default: user)\n"
|
||||
" -f, --file Passphrase file to read from (disables passphrase prompt)\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -103,6 +104,7 @@ static void set_passphrase_usage(void)
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
@ -168,6 +170,7 @@ static void remove_passphrase_usage(void)
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -20,9 +20,10 @@ static void kill_btree_node_usage(void)
|
||||
"Usage: bcachefs kill_btree_node [OPTION]... <devices>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -n, --node btree:level:idx Node to kill\n"
|
||||
" -d, --dev dev Device index (default: kill all replicas)\n"
|
||||
" -h Display this help and exit\n"
|
||||
" -n, --node btree:level:idx Node to kill\n"
|
||||
" -d, --dev dev Device index (default: kill all replicas)\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -440,6 +440,7 @@ static void list_journal_usage(void)
|
||||
" Or entries not matching the range bbpos-bbpos\n"
|
||||
" -v, --verbose Verbose mode\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -188,17 +188,19 @@ static void migrate_usage(void)
|
||||
"Usage: bcachefs migrate [OPTION]...\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -f fs Root of filesystem to migrate(s)\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" --no_passphrase Don't encrypt master encryption key\n"
|
||||
" -F Force, even if metadata file already exists\n"
|
||||
" -h Display this help and exit\n"
|
||||
" -f fs Root of filesystem to migrate(s)\n"
|
||||
" --encrypted Enable whole filesystem encryption (chacha20/poly1305)\n"
|
||||
" --no_passphrase Don't encrypt master encryption key\n"
|
||||
" -F Force, even if metadata file already exists\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
static const struct option migrate_opts[] = {
|
||||
{ "encrypted", no_argument, NULL, 'e' },
|
||||
{ "no_passphrase", no_argument, NULL, 'p' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
@ -383,9 +385,10 @@ static void migrate_superblock_usage(void)
|
||||
"Usage: bcachefs migrate-superblock [OPTION]...\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -d, --dev device Device to create superblock for\n"
|
||||
" -o, --offset offset Offset of existing superblock\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
" -d, --dev device Device to create superblock for\n"
|
||||
" -o, --offset offset Offset of existing superblock\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ static void set_option_usage(void)
|
||||
bch2_opts_usage(OPT_MOUNT|OPT_RUNTIME);
|
||||
puts(" -d, --dev-idx index for device specific options\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@ -77,6 +77,7 @@ static void strip_alloc_usage(void)
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -44,6 +44,7 @@ static void show_super_usage(void)
|
||||
" --field-only=fiel) print superblock section only, no header\n"
|
||||
" -l, --layout print superblock layout\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
@ -122,8 +123,8 @@ int cmd_show_super(int argc, char *argv[])
|
||||
static const struct option longopts[] = {
|
||||
{ "fields", 1, NULL, 'f' },
|
||||
{ "field-only", 1, NULL, 'F' },
|
||||
{ "layout", 0, NULL, 'l' },
|
||||
{ "help", 0, NULL, 'h' },
|
||||
{ "layout", no_argument, NULL, 'l' },
|
||||
{ "help", no_argument, NULL, 'h' },
|
||||
{ NULL }
|
||||
};
|
||||
unsigned fields = 0;
|
||||
@ -387,6 +388,7 @@ static void recover_super_usage(void)
|
||||
" -y, --yes Recover without prompting\n"
|
||||
" -v, --verbose Increase logging level\n"
|
||||
" -h, --help display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
@ -76,8 +76,9 @@ static void fs_top_usage(void)
|
||||
"Usage: bcachefs fs top [OPTION]... <mountpoint>\n"
|
||||
"\n"
|
||||
"Options:\n"
|
||||
" -h, --human-readable Human readable units\n"
|
||||
" -H, --help Display this help and exit\n"
|
||||
" -h, --human-readable Human readable units\n"
|
||||
" -H, --help Display this help and exit\n"
|
||||
"\n"
|
||||
"Report bugs to <linux-bcachefs@vger.kernel.org>");
|
||||
}
|
||||
|
||||
|
||||
@ -869,7 +869,7 @@ struct bch_opts bch2_parse_opts(struct bch_opt_strs strs)
|
||||
void bch2_opts_usage(unsigned opt_types)
|
||||
{
|
||||
const struct bch_option *opt;
|
||||
unsigned i, c = 0, helpcol = 30;
|
||||
unsigned i, c = 0, helpcol = 32;
|
||||
|
||||
for (opt = bch2_opt_table;
|
||||
opt < bch2_opt_table + bch2_opts_nr;
|
||||
@ -899,13 +899,14 @@ void bch2_opts_usage(unsigned opt_types)
|
||||
if (opt->help) {
|
||||
const char *l = opt->help;
|
||||
|
||||
if (c >= helpcol)
|
||||
if (c > helpcol) {
|
||||
newline(c);
|
||||
}
|
||||
|
||||
while (1) {
|
||||
const char *n = strchrnul(l, '\n');
|
||||
|
||||
while (c < helpcol) {
|
||||
while (c < helpcol-1) {
|
||||
putchar(' ');
|
||||
c++;
|
||||
}
|
||||
|
||||
@ -527,7 +527,7 @@ enum fsck_err_opts {
|
||||
OPT_DEVICE|OPT_RUNTIME, \
|
||||
OPT_STR(bch2_member_states), \
|
||||
BCH_MEMBER_STATE, BCH_MEMBER_STATE_rw, \
|
||||
"state", "rw,ro,failed,spare") \
|
||||
"state", "Specifies device state") \
|
||||
x(bucket_size, u32, \
|
||||
OPT_DEVICE|OPT_HUMAN_READABLE|OPT_SB_FIELD_SECTORS, \
|
||||
OPT_UINT(0, S64_MAX), \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user