diff options
author | Wang Shilong <wangsl-fnst@cn.fujitsu.com> | 2013-10-07 15:21:40 +0800 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2013-10-16 08:23:12 -0400 |
commit | 0944502866628d6b31fb628108c3811465940760 (patch) | |
tree | 0f7341924c9704059172ee241c31b7a0933d2b4a /cmds-qgroup.c | |
parent | 14b6c32037b19a860132e4e37c09d2d9705ee500 (diff) |
Btrfs-progs: introduce '-r' option to print max referenced size of qgroups
This patch introduces '-r' option to print max referenced size of qgroups.
You may use it like:
btrfs qgroup show -r <path>
Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'cmds-qgroup.c')
-rw-r--r-- | cmds-qgroup.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds-qgroup.c b/cmds-qgroup.c index 147bedc2..213cbde0 100644 --- a/cmds-qgroup.c +++ b/cmds-qgroup.c @@ -202,10 +202,11 @@ static int cmd_qgroup_destroy(int argc, char **argv) } static const char * const cmd_qgroup_show_usage[] = { - "btrfs qgroup show -pc <path>", + "btrfs qgroup show -pcr <path>", "Show all subvolume quota groups.", "-p print parent qgroup id", "-c print child qgroup id", + "-r print max referenced size of qgroup", NULL }; @@ -220,7 +221,7 @@ static int cmd_qgroup_show(int argc, char **argv) optind = 1; while (1) { - c = getopt(argc, argv, "pc"); + c = getopt(argc, argv, "pcr"); if (c < 0) break; switch (c) { @@ -232,6 +233,10 @@ static int cmd_qgroup_show(int argc, char **argv) btrfs_qgroup_setup_print_column( BTRFS_QGROUP_CHILD); break; + case 'r': + btrfs_qgroup_setup_print_column( + BTRFS_QGROUP_MAX_RFER); + break; default: usage(cmd_qgroup_show_usage); } |