btrfs-progs: balance: warn when deprecated syntax is used

Deprecate old 'btrfs balance' syntax since new syntax has been
introduced in 2012.  We will remove the old syntax completely in a few
releases.

Signed-off-by: Wang Yugui <wangyugui@e16-tech.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Wang Yugui 2022-09-22 05:54:42 +08:00 committed by David Sterba
parent 6f7151f499
commit 7ff278ba3d
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,7 @@
static const char * const balance_cmd_group_usage[] = {
"btrfs balance <command> [options] <path>",
"btrfs balance <path>",
"btrfs balance <path> (deprecated, use 'btrfs balance start')",
NULL
};
@ -885,6 +885,7 @@ static int cmd_balance(const struct cmd_struct *cmd, int argc, char **argv)
if (old_syntax) {
struct btrfs_ioctl_balance_args args;
warning("deprecated syntax, please use 'btrfs balance start'");
memset(&args, 0, sizeof(args));
args.flags |= BTRFS_BALANCE_TYPE_MASK;