btrfs-progs: tune: use long option to enable simple quota
The initial patch used -q for enabling simple quota but this is not right, -q is reserved for --quiet and we want the long options first. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
83ae2d58c9
commit
d71ece203a
17
tune/main.c
17
tune/main.c
|
@ -201,7 +201,10 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[])
|
||||||
enum { GETOPT_VAL_CSUM = GETOPT_VAL_FIRST,
|
enum { GETOPT_VAL_CSUM = GETOPT_VAL_FIRST,
|
||||||
GETOPT_VAL_ENABLE_BLOCK_GROUP_TREE,
|
GETOPT_VAL_ENABLE_BLOCK_GROUP_TREE,
|
||||||
GETOPT_VAL_DISABLE_BLOCK_GROUP_TREE,
|
GETOPT_VAL_DISABLE_BLOCK_GROUP_TREE,
|
||||||
GETOPT_VAL_ENABLE_FREE_SPACE_TREE };
|
GETOPT_VAL_ENABLE_FREE_SPACE_TREE,
|
||||||
|
GETOPT_VAL_ENABLE_SIMPLE_QUOTA,
|
||||||
|
|
||||||
|
};
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "help", no_argument, NULL, GETOPT_VAL_HELP},
|
{ "help", no_argument, NULL, GETOPT_VAL_HELP},
|
||||||
{ "convert-to-block-group-tree", no_argument, NULL,
|
{ "convert-to-block-group-tree", no_argument, NULL,
|
||||||
|
@ -210,12 +213,14 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[])
|
||||||
GETOPT_VAL_DISABLE_BLOCK_GROUP_TREE},
|
GETOPT_VAL_DISABLE_BLOCK_GROUP_TREE},
|
||||||
{ "convert-to-free-space-tree", no_argument, NULL,
|
{ "convert-to-free-space-tree", no_argument, NULL,
|
||||||
GETOPT_VAL_ENABLE_FREE_SPACE_TREE},
|
GETOPT_VAL_ENABLE_FREE_SPACE_TREE},
|
||||||
|
{ "enable-simple-quota", no_argument, NULL,
|
||||||
|
GETOPT_VAL_ENABLE_SIMPLE_QUOTA },
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
{ "csum", required_argument, NULL, GETOPT_VAL_CSUM },
|
{ "csum", required_argument, NULL, GETOPT_VAL_CSUM },
|
||||||
#endif
|
#endif
|
||||||
{ NULL, 0, NULL, 0 }
|
{ NULL, 0, NULL, 0 }
|
||||||
};
|
};
|
||||||
int c = getopt_long(argc, argv, "S:rxqfuU:nmM:", long_options, NULL);
|
int c = getopt_long(argc, argv, "S:rxfuU:nmM:", long_options, NULL);
|
||||||
|
|
||||||
if (c < 0)
|
if (c < 0)
|
||||||
break;
|
break;
|
||||||
|
@ -233,10 +238,6 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[])
|
||||||
super_flags |= BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA;
|
super_flags |= BTRFS_FEATURE_INCOMPAT_SKINNY_METADATA;
|
||||||
btrfstune_cmd_groups[LEGACY] = true;
|
btrfstune_cmd_groups[LEGACY] = true;
|
||||||
break;
|
break;
|
||||||
case 'q':
|
|
||||||
quota = 1;
|
|
||||||
btrfstune_cmd_groups[QGROUP] = true;
|
|
||||||
break;
|
|
||||||
case 'n':
|
case 'n':
|
||||||
super_flags |= BTRFS_FEATURE_INCOMPAT_NO_HOLES;
|
super_flags |= BTRFS_FEATURE_INCOMPAT_NO_HOLES;
|
||||||
btrfstune_cmd_groups[LEGACY] = true;
|
btrfstune_cmd_groups[LEGACY] = true;
|
||||||
|
@ -277,6 +278,10 @@ int BOX_MAIN(btrfstune)(int argc, char *argv[])
|
||||||
to_fst = true;
|
to_fst = true;
|
||||||
btrfstune_cmd_groups[SPACE_CACHE] = true;
|
btrfstune_cmd_groups[SPACE_CACHE] = true;
|
||||||
break;
|
break;
|
||||||
|
case GETOPT_VAL_ENABLE_SIMPLE_QUOTA:
|
||||||
|
quota = 1;
|
||||||
|
btrfstune_cmd_groups[QGROUP] = true;
|
||||||
|
break;
|
||||||
#if EXPERIMENTAL
|
#if EXPERIMENTAL
|
||||||
case GETOPT_VAL_CSUM:
|
case GETOPT_VAL_CSUM:
|
||||||
btrfs_warn_experimental(
|
btrfs_warn_experimental(
|
||||||
|
|
Loading…
Reference in New Issue