All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: qgroup: add sysfs interface for debug
Date: Fri, 19 Jun 2020 17:52:32 +0800	[thread overview]
Message-ID: <94942230-bada-98a0-3d94-3b466752ff3e@gmx.com> (raw)
In-Reply-To: <20200619093903.GB27795@twin.jikos.cz>


[-- Attachment #1.1: Type: text/plain, Size: 1726 bytes --]



On 2020/6/19 下午5:39, David Sterba wrote:
> On Fri, Jun 19, 2020 at 09:59:46AM +0800, Qu Wenruo wrote:
>> This patch will add the following sysfs interface:
>> /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/rfer
>> /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/excl
>> /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_rfer
>> /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/max_excl
>> /sys/fs/btrfs/<UUID>/qgroups/<qgroup_id>/lim_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
>>
>> The last 3 rsv related members are not visible to users, but can be very
>> useful to debug qgroup limit related bugs.
>>
>> Also, to avoid '/' used in <qgroup_id>, the seperator between qgroup
>> level and qgroup id is changed to '_'.
>>
>> The interface is not hidden behind 'debug' as I want this interface to
>> be included into production build so we could have an easier life to
>> debug qgroup rsv related bugs.
> 
> But why do you want to export it to sysfs at all?
> 
There is an internal report where user is not that co-operative to do
more experiments, but insists on providing more debugging info.

And since they don't want to unset qgroup limit, nor unmount their root
fs to make sure the latest qgroup data rsv safenet catches leakage, the
last method to debug strange early EDQUOT is to export rsv info to user
space.

And, for most users, the new interface won't bother anyone, but when
things go wrong and the user is not cooperative, such interface can save
us a lot of time.

Thanks,
Qu


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2020-06-19  9:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19  1:59 [PATCH] btrfs: qgroup: add sysfs interface for debug Qu Wenruo
2020-06-19  7:24 ` Qu Wenruo
2020-06-19  9:39 ` David Sterba
2020-06-19  9:52   ` Qu Wenruo [this message]
2020-06-25 20:21 ` David Sterba
2020-06-25 23:21   ` Qu Wenruo
2020-06-26 11:14     ` David Sterba
2020-06-26 10:46 ` David Sterba
2020-06-26 11:09   ` Qu Wenruo
2020-06-26 11:40     ` David Sterba
2020-06-26 11:43       ` Qu Wenruo
2020-06-26 11:40     ` Qu Wenruo

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=94942230-bada-98a0-3d94-3b466752ff3e@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.