From: David Sterba <dsterba@suse.cz>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug
Date: Tue, 30 Jun 2020 16:27:54 +0200 [thread overview]
Message-ID: <20200630142754.GY27795@twin.jikos.cz> (raw)
In-Reply-To: <20200630080735.GQ27795@twin.jikos.cz>
On Tue, Jun 30, 2020 at 10:07:35AM +0200, David Sterba wrote:
> We need to at lest have a solid idea how to extend it, not neccessarily
> to implement it right now. Adding the group membership to qgroup
> directories under the qgroup directory as symlinks between the kobjects
> sounds ok-ish to me but it's a new idea and I need to think about it.
So my current winner idea for the hierarchy representation is to keep
all child qgroups as symlinks in the parent group. This does not require
extra kojbect to keep, and the path in sysfs would reflect the
hierarchy, like:
/sys/fs/btrfs/UUID/qgroups/4_1/3_1/2_1/1234_0
This tracks only the parent -> child pointers, so to see all parent
qgroups one has to build the reverse graph or simply search which
1st level directories contain the group as child.
Implementation is one more sysfs_create_link, the leaf qgroups
representing subvolumes will contain only the files with stats.
One potential drawback is the maximum size of path that will not allow
to show deep qgroup hierarchies, but still about 200-400 in case of
average qgroup id 20 or 10 respectively.
next prev parent reply other threads:[~2020-06-30 14:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 5:07 [PATCH v2 0/2] btrfs: add sysfs interface for qgroup Qu Wenruo
2020-06-28 5:07 ` [PATCH v2 1/2] btrfs: use __u16 for the return value of btrfs_qgroup_level() Qu Wenruo
2020-06-28 5:07 ` [PATCH v2 2/2] btrfs: qgroup: add sysfs interface for debug Qu Wenruo
2020-06-29 21:30 ` David Sterba
2020-06-29 23:17 ` Qu Wenruo
2020-06-30 8:07 ` David Sterba
2020-06-30 14:27 ` David Sterba [this message]
2020-06-30 16:57 ` David Sterba
2020-07-01 0:06 ` Qu Wenruo
2020-07-15 13:49 ` Chris Down
2020-07-16 0:15 ` Qu Wenruo
2020-07-16 0:25 ` Chris Down
2020-07-16 0:27 ` Qu Wenruo
[not found] ` <20200716004031.GC2140@chrisdown.name>
2020-07-16 1:51 ` Qu Wenruo
2020-07-16 6:21 ` Qu Wenruo
2020-07-16 8:41 ` Chris Down
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=20200630142754.GY27795@twin.jikos.cz \
--to=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=wqu@suse.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