linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: Nikolay Borisov <nborisov@suse.com>,
	linux-btrfs@vger.kernel.org, wqu@suse.com
Subject: Re: [PATCH] btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable
Date: Mon, 12 Feb 2018 19:20:05 +0100	[thread overview]
Message-ID: <20180212182005.GO3003@twin.jikos.cz> (raw)
In-Reply-To: <fd3a625b-cc65-b032-911a-e9154ddd99d5@gmx.com>

On Sat, Feb 03, 2018 at 11:30:42AM +0800, Qu Wenruo wrote:
> 
> 
> On 2018年01月31日 16:52, Nikolay Borisov wrote:
> > Currently btrfs_run_qgroups is doing a bit too much. Not only is it
> > responsible for synchronizing in-memory state of qgroups to disk but
> > it also contains code to trigger the initial qgroup rescan when
> > quota is enabled initially. This condition is detected by checking that
> > BTRFS_FS_QUOTA_ENABLED is not set and BTRFS_FS_QUOTA_ENABLING is set.
> > Nothing really requires fro the code to be structured (and scattered)
> > the way it is so let's streamline things. First move the quota rescan
> > code into btrfs_quota_enable, where its invocation is closer to the
> > user. This also makes the FS_QUOTA_ENABLING flag redundant so let's
> > remove it as well.i
> > 
> > This has been tested with a full xfstest run with qgroups enabled on
> > the scratch device of every xfstest and no regressions were observed.
> > 
> > Signed-off-by: Nikolay Borisov <nborisov@suse.com>
> 
> Looks good.
> 
> Since rescan work is async, initializing it at enable looks pretty
> reasonable.
> 
> No delaying makes it easier to read.
> 
> > ---
> >  fs/btrfs/ctree.h  |  1 -
> >  fs/btrfs/qgroup.c | 35 ++++++++++-------------------------
> >  2 files changed, 10 insertions(+), 26 deletions(-)
> 
> And indeed reduces codes.
> 
> Reviewed-by: Qu Wenruo <wqu@suse.com>

Looks good to me to, added to next. The two bits tracking the state
seemed like an overkill to me. Thanks.

      reply	other threads:[~2018-02-12 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  8:52 [PATCH] btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable Nikolay Borisov
2018-02-03  3:30 ` Qu Wenruo
2018-02-12 18:20   ` David Sterba [this message]

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=20180212182005.GO3003@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=nborisov@suse.com \
    --cc=quwenruo.btrfs@gmx.com \
    --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;
as well as URLs for NNTP newsgroup(s).