From: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
To: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 1/2] btrfs-progs: qgroup: show 'none' when we did not limit it on this qgroup
Date: Wed, 03 Jun 2015 17:14:15 +0900 [thread overview]
Message-ID: <556EB757.9040409@jp.fujitsu.com> (raw)
In-Reply-To: <1433314653-548-1-git-send-email-yangds.fnst@cn.fujitsu.com>
On 2015/06/03 15:57, Dongsheng Yang wrote:
> There are two understanding of the '0' value in btrfs qgroup show.
> (1) is no-limitation on this qgroup. (2) is the max-limitation is 0.
>
> This patch make it showing in different way.
>
> (1). max-limitation for 0 is still showing '0'.
> (2). no-limitation will show 'none'.
>
> qgroupid rfer excl max_rfer max_excl parent
> -------- ---- ---- -------- -------- ------
> 0/5 2.19GiB 2.19GiB none none ---
> 0/257 100.02MiB 100.02MiB none none ---
>
> Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Tested-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
> ---
> qgroup.c | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/qgroup.c b/qgroup.c
> index 53815b5..dc04b03 100644
> --- a/qgroup.c
> +++ b/qgroup.c
> @@ -237,10 +237,16 @@ static void print_qgroup_column(struct btrfs_qgroup *qgroup,
> print_qgroup_column_add_blank(BTRFS_QGROUP_PARENT, len);
> break;
> case BTRFS_QGROUP_MAX_RFER:
> - len = printf("%*s", max_len, pretty_size_mode(qgroup->max_rfer, unit_mode));
> + if (qgroup->flags & BTRFS_QGROUP_LIMIT_MAX_RFER)
> + len = printf("%*s", max_len, pretty_size_mode(qgroup->max_rfer, unit_mode));
> + else
> + len = printf("%*s", max_len, "none");
> break;
> case BTRFS_QGROUP_MAX_EXCL:
> - len = printf("%*s", max_len, pretty_size_mode(qgroup->max_excl, unit_mode));
> + if (qgroup->flags & BTRFS_QGROUP_LIMIT_MAX_EXCL)
> + len = printf("%*s", max_len, pretty_size_mode(qgroup->max_excl, unit_mode));
> + else
> + len = printf("%*s", max_len, "none");
> break;
> case BTRFS_QGROUP_CHILD:
> len = print_child_column(qgroup);
>
next prev parent reply other threads:[~2015-06-03 8:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 6:57 [PATCH 1/2] btrfs-progs: qgroup: show 'none' when we did not limit it on this qgroup Dongsheng Yang
2015-06-03 6:57 ` [PATCH] btrfs: qgroup: allow user to clear the limitation on qgroup Dongsheng Yang
2015-06-03 8:18 ` Tsutomu Itoh
2015-06-03 6:57 ` [PATCH 2/2] btrfs-progs: qgroup: allow user to clear some " Dongsheng Yang
2015-06-03 8:40 ` Tsutomu Itoh
2015-06-03 8:41 ` Dongsheng Yang
2015-06-05 16:37 ` David Sterba
2015-06-03 8:14 ` Tsutomu Itoh [this message]
2015-06-05 16:36 ` [PATCH 1/2] btrfs-progs: qgroup: show 'none' when we did not limit it on this qgroup 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=556EB757.9040409@jp.fujitsu.com \
--to=t-itoh@jp.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=yangds.fnst@cn.fujitsu.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox