All of lore.kernel.org
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: dsterba@suse.cz, linux-btrfs@vger.kernel.org, clm@fb.com
Subject: [PATCH 5/5] btrfs-progs: qgroup assign can't handle --no-rescan option
Date: Fri, 18 Mar 2016 10:36:29 +0900	[thread overview]
Message-ID: <56EB5B9D.2010501@jp.fujitsu.com> (raw)
In-Reply-To: <56EB5937.8070208@jp.fujitsu.com>

* actual result

   ==================================================
   # btrfs qgroup assign --no-rescan 0/260 1/261 /btrfs
   btrfs qgroup assign: unrecognized option '--no-rescan'
   usage: btrfs qgroup assign [options] <src> <dst> <path>

       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 <takeuchi_satoru@jp.fujitsu.com>
---
  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
  };

-- 
2.7.0

  parent reply	other threads:[~2016-03-18  1:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18  1:26 [PATCH 1/5] btrfs-progs: "sub get-default" doesn't work Satoru Takeuchi
2016-03-18  1:29 ` [PATCH 2/5] btrfs-progs: "qgroup create/destroy" don't work Satoru Takeuchi
2016-03-18  1:31 ` [PATCH 3/5] btrfs-progs: "inspect-internal subvolid-resolve" doesn't work Satoru Takeuchi
2016-03-18  1:35 ` [PATCH 4/5] btrfs-progs: "qgroup assign" can't handle options Satoru Takeuchi
2016-03-18  1:36 ` Satoru Takeuchi [this message]
2016-03-18 13:26 ` [PATCH 1/5] btrfs-progs: "sub get-default" doesn't work David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56EB5B9D.2010501@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.