From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs: add sysfs interface for qgroup
Date: Sun, 28 Jun 2020 13:07:13 +0800 [thread overview]
Message-ID: <20200628050715.60961-1-wqu@suse.com> (raw)
This patchset will add the following sysfs interfaces for qgroup:
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/reference
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/exclusive
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_reference
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_exclusive
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/limit_flags
^^^ Above are already in "btrfs qgroup show" command output ^^^
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_data
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_pertrans
/sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rsv_meta_prealloc
These interfaces are mostly for debug purpose, to give us a clear view
of which part is leaking.
Changelog:
v2:
- Add a new patch to change the return value type of
btrfs_qgroup_level()
- Fix the wrong btrfs_sysfs_add_one_qgroup() call timming
That function needs to allocate memory, thus can't be called in
add_qgroup_rb() where some call sites are holding a spin lock.
Delay btrfs_sysfs_add_one_qgroup() after add_qgroup_rb() until the
spin lock is released.
- Skip qgroup sysfs interface for qgroup selftest
This makes no sense for selftest to initialize the sysfs interface
and since we don't initialize fs_devices->kobj either, it's not
possible to utilize the sysfs interface in selftest.
- Use proper helpers for qgroup BTRFS_ATTRs
- Use more human-readable names in qgroup sysfs entries
- Remove the unneeded completion for qgroup
Qu Wenruo (2):
btrfs: use __u16 for the return value of btrfs_qgroup_level()
btrfs: qgroup: add sysfs interface for debug
fs/btrfs/ctree.h | 1 +
fs/btrfs/qgroup.c | 46 +++++++---
fs/btrfs/qgroup.h | 11 +++
fs/btrfs/sysfs.c | 151 ++++++++++++++++++++++++++++++++
fs/btrfs/sysfs.h | 6 ++
include/uapi/linux/btrfs_tree.h | 4 +-
6 files changed, 207 insertions(+), 12 deletions(-)
--
2.27.0
next reply other threads:[~2020-06-28 5:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-28 5:07 Qu Wenruo [this message]
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
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=20200628050715.60961-1-wqu@suse.com \
--to=wqu@suse.com \
--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