From patchwork Wed Sep 21 15:34:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Yugui X-Patchwork-Id: 12983915 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 758A9C6FA82 for ; Wed, 21 Sep 2022 15:39:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbiIUPjF (ORCPT ); Wed, 21 Sep 2022 11:39:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230359AbiIUPio (ORCPT ); Wed, 21 Sep 2022 11:38:44 -0400 Received: from out20-194.mail.aliyun.com (out20-194.mail.aliyun.com [115.124.20.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 125BAF75 for ; Wed, 21 Sep 2022 08:34:32 -0700 (PDT) X-Alimail-AntiSpam: AC=CONTINUE;BC=0.04814807|-1;BR=01201311R201S00rulernew998_84748_2000303;CH=blue;DM=|CONTINUE|false|;DS=CONTINUE|ham_enroll_verification|0.000481968-9.22835e-05-0.999426;FP=0|0|0|0|0|-1|-1|-1;HT=ay29a033018047202;MF=wangyugui@e16-tech.com;NM=1;PH=DS;RN=2;RT=2;SR=0;TI=SMTPD_---.PL24rt-_1663774456; Received: from T640.e16-tech.com(mailfrom:wangyugui@e16-tech.com fp:SMTPD_---.PL24rt-_1663774456) by smtp.aliyun-inc.com; Wed, 21 Sep 2022 23:34:17 +0800 From: Wang Yugui To: linux-btrfs@vger.kernel.org Cc: Wang Yugui Subject: [PATCH] btrfs-progs: balance: deprecate old syntax Date: Wed, 21 Sep 2022 23:34:16 +0800 Message-Id: <20220921153416.53863-1-wangyugui@e16-tech.com> X-Mailer: git-send-email 2.36.2 In-Reply-To: <20220914055846.52008-1-wangyugui@e16-tech.com> References: <20220914055846.52008-1-wangyugui@e16-tech.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org deprecate btrfs blanace old syntax since new syntax is already introduced in 2012. we will remove the old syntax completely in a few releases. Signed-off-by: Wang Yugui --- cmds/balance.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmds/balance.c b/cmds/balance.c index d1e66d42..3cb6334a 100644 --- a/cmds/balance.c +++ b/cmds/balance.c @@ -37,7 +37,7 @@ static const char * const balance_cmd_group_usage[] = { "btrfs balance [options] ", - "btrfs balance ", + "btrfs balance deprecated by 'btrfs balance replace'", NULL }; @@ -882,6 +882,8 @@ static int cmd_balance(const struct cmd_struct *cmd, int argc, char **argv) /* old 'btrfs filesystem balance ' syntax */ struct btrfs_ioctl_balance_args args; + warning("deprecated by 'btrfs balance replace'"); + memset(&args, 0, sizeof(args)); args.flags |= BTRFS_BALANCE_TYPE_MASK;