btrfs-progs: mkfs: remove support for option --leafsize

The leafsize has never been different from nodesize and since 4.0 (2015)
it's been alias for nodesize. This should be enough time for everybody
to update so the support is removed.

Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba 2022-09-30 08:27:12 +02:00
parent 48c5740e87
commit f7a768d624
2 changed files with 8 additions and 6 deletions

View File

@ -99,9 +99,6 @@ OPTIONS
be set at creation time. Conversion to or from mixed profile is not be set at creation time. Conversion to or from mixed profile is not
implemented. implemented.
-l|--leafsize <size>
Alias for *--nodesize*. Deprecated.
-n|--nodesize <size> -n|--nodesize <size>
Specify the nodesize, the tree block size in which btrfs stores metadata. The Specify the nodesize, the tree block size in which btrfs stores metadata. The
default value is 16KiB (16384) or the page size, whichever is bigger. Must be a default value is 16KiB (16384) or the page size, whichever is bigger. Must be a
@ -199,6 +196,9 @@ OPTIONS
--help --help
Print help. Print help.
-l|--leafsize <size>
Removed in 6.0, used to be alias for *--nodesize*.
SIZE UNITS SIZE UNITS
---------- ----------

View File

@ -431,7 +431,7 @@ static void print_usage(int ret)
printf("\t-V|--version print the mkfs.btrfs version and exit\n"); printf("\t-V|--version print the mkfs.btrfs version and exit\n");
printf("\t--help print this help and exit\n"); printf("\t--help print this help and exit\n");
printf(" deprecated:\n"); printf(" deprecated:\n");
printf("\t-l|--leafsize SIZE deprecated, alias for nodesize\n"); printf("\t-l|--leafsize SIZE removed in 6.0, use --nodesize\n");
exit(ret); exit(ret);
} }
@ -1072,8 +1072,10 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
data_profile_set = true; data_profile_set = true;
break; break;
case 'l': case 'l':
warning("--leafsize is deprecated, use --nodesize"); /* Deprecated in 4.0 */
/* fall through */ error("--leafsize has been removed in 6.0, use --nodesize");
ret = 1;
goto error;
case 'n': case 'n':
nodesize = parse_size_from_string(optarg); nodesize = parse_size_from_string(optarg);
nodesize_forced = true; nodesize_forced = true;