From patchwork Fri Mar 18 01:36:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Satoru Takeuchi X-Patchwork-Id: 8615501 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 376E9C0553 for ; Fri, 18 Mar 2016 01:37:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5705C20204 for ; Fri, 18 Mar 2016 01:37:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 63611201CD for ; Fri, 18 Mar 2016 01:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042AbcCRBgp (ORCPT ); Thu, 17 Mar 2016 21:36:45 -0400 Received: from mgwkm03.jp.fujitsu.com ([202.219.69.170]:58614 "EHLO mgwkm03.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752022AbcCRBgn (ORCPT ); Thu, 17 Mar 2016 21:36:43 -0400 Received: from kw-mxauth.gw.nic.fujitsu.com (unknown [192.168.231.132]) by mgwkm03.jp.fujitsu.com with smtp id 3fa2_56de_7db5fb1c_b6f6_4a2f_a0de_3712d28e1614; Fri, 18 Mar 2016 10:36:37 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by kw-mxauth.gw.nic.fujitsu.com (Postfix) with ESMTP id 9EC67AC00B1 for ; Fri, 18 Mar 2016 10:36:36 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.4.6 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20160122 X-SHieldMailCheckerMailID: 6c337024aff14fdcbea5b89b86a98a33 Subject: [PATCH 5/5] btrfs-progs: qgroup assign can't handle --no-rescan option To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, clm@fb.com References: <20160316182941.GR21722@suse.cz> <56EB5937.8070208@jp.fujitsu.com> From: Satoru Takeuchi Message-ID: <56EB5B9D.2010501@jp.fujitsu.com> Date: Fri, 18 Mar 2016 10:36:29 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <56EB5937.8070208@jp.fujitsu.com> X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * actual result ================================================== # btrfs qgroup assign --no-rescan 0/260 1/261 /btrfs btrfs qgroup assign: unrecognized option '--no-rescan' usage: btrfs qgroup assign [options] Assign SRC as the child qgroup of DST --rescan schedule qutoa rescan if needed --no-rescan ================================================== * expected result ================================================== # ./btrfs qgroup assign --no-rescan 0/260 1/261 /btrfs # ================================================== Signed-off-by: Satoru Takeuchi --- cmds-qgroup.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmds-qgroup.c b/cmds-qgroup.c index ebd66ef..4b4149d 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -44,9 +44,13 @@ static int _cmd_qgroup_assign(int assign, int argc, char **argv, if (assign) { while (1) { - enum { GETOPT_VAL_RESCAN = 256 }; + enum { + GETOPT_VAL_RESCAN = 256, + GETOPT_VAL_NO_RESCAN = 257, + }; static const struct option long_options[] = { { "rescan", no_argument, NULL, GETOPT_VAL_RESCAN }, + { "no-rescan", no_argument, NULL, GETOPT_VAL_NO_RESCAN }, { NULL, 0, NULL, 0 } }; int c = getopt_long(argc, argv, "", long_options, NULL); @@ -57,6 +61,9 @@ static int _cmd_qgroup_assign(int assign, int argc, char **argv, case GETOPT_VAL_RESCAN: rescan = 1; break; + case GETOPT_VAL_NO_RESCAN: + rescan = 0; + break; default: usage(usage_str); } @@ -206,7 +213,7 @@ static const char * const cmd_qgroup_assign_usage[] = { "Assign SRC as the child qgroup of DST", "", "--rescan schedule qutoa rescan if needed", - "--no-rescan ", + "--no-rescan don't schedule quota rescan", NULL };