From: Wang Shilong <wangshilong1991@gmail.com>
To: "dsterba@suse.cz Sterba" <dsterba@suse.cz>,
Anand Jain <anand.jain@oracle.com>
Cc: "linux-btrfs@vger.kernel.org FILE SYSTEM list:BTRFS"
<linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH v2] btrfs-progs: calculate disk space that a subvol could free
Date: Wed, 9 Oct 2013 22:17:49 +0800 [thread overview]
Message-ID: <237D022A-BBC2-412C-9E41-45EB4B299660@gmail.com> (raw)
In-Reply-To: <20131008164951.GC12986@twin.jikos.cz>
Hello David, Anand,
> On Mon, Oct 07, 2013 at 10:47:56AM +0800, Anand Jain wrote:
>> I was also thinking if this should be inside kernel
>> facilitated by a new ioctl? so that we avoid number
>> of search ioctl thats required.
>
> I think so. And for the feature itself, it can be handy in case where
> qgroups are not established.
Actually, i have not found an effectively way to work out this.
Whatever we implement this as an ioctl in kernel space or just in userspace,
why not just trigger quota enabled, but not set qgroup limit.
If quota been enabled, quota rescan will calculate every subvolume's
referenced and exclusive size(to implement this we have to iterate extent tree though).
Luckily, after that, quota itself will track every subvolume's sole size(exclusive size).
Justing using 'btrfs qgroup show', we can figure out every subvolume's referenced size
and exclusive size easily, i think this is another important use of qgroup.
If users want to find top subvolume's sole size, they can use:
btrfs qgroup show <mnt> --sort=+/-excl
This approach maybe a little tricky, but it is better than implement an ioctl to calculate
one subvolume's size every time.
Thanks,
Wang
>
> david
next prev parent reply other threads:[~2013-10-09 14:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-27 16:45 [PATCH] btrfs-progs: calculate disk space that a subvol could free Anand Jain
2013-09-27 19:10 ` Zach Brown
2013-09-28 17:19 ` Anand Jain
2013-09-29 15:02 ` Anand Jain
2013-10-01 13:25 ` David Sterba
2013-09-29 15:15 ` [PATCH V2] btrfs-progs: device add should check existing FS before adding Anand Jain
2013-09-29 15:26 ` Anand Jain
2013-09-29 15:25 ` [PATCH v2] btrfs-progs: calculate disk space that a subvol could free Anand Jain
2013-10-01 13:39 ` David Sterba
2013-10-01 14:05 ` Wang Shilong
2013-10-07 2:47 ` Anand Jain
2013-10-07 3:01 ` Wang Shilong
2013-10-07 3:22 ` Anand Jain
2013-10-08 16:49 ` David Sterba
2013-10-09 14:17 ` Wang Shilong [this message]
2013-10-10 3:35 ` Anand Jain
2013-10-10 3:33 ` Wang Shilong
2013-11-28 17:39 ` Alex Lyakas
2013-11-29 1:34 ` Wang Shilong
2013-11-29 1:57 ` Anand Jain
2013-10-09 8:03 ` Anand Jain
2013-10-09 8:35 ` Wang Shilong
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=237D022A-BBC2-412C-9E41-45EB4B299660@gmail.com \
--to=wangshilong1991@gmail.com \
--cc=anand.jain@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).