All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: David Sterba <dsterba@suse.cz>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: open-code remount flag setting in btrfs_remount
Date: Wed, 22 Jul 2020 16:15:33 +0200	[thread overview]
Message-ID: <20200722141533.GW3703@twin.jikos.cz> (raw)
In-Reply-To: <20200722090039.17402-1-johannes.thumshirn@wdc.com>

On Wed, Jul 22, 2020 at 06:00:39PM +0900, Johannes Thumshirn wrote:
> When we're (re)mounting a btrfs filesystem we set the
> BTRFS_FS_STATE_REMOUNTING state in fs_info to serialize against async
> reclaim or defrags.
> 
> This flag is set in btrfs_remount_prepare() called by btrfs_remount(). As
> btrfs_remount_prepare() does nothing but setting this flag and doesn't
> have a second caller, we can just open-code the flag setting in
> btrfs_remount().

Agreed, that's too trivial and set_bit of state flags are commonly used.
I'd suggest to also lift the clear_bit counterpart from
btrfs_remount_cleanup and move it right after it in btrfs_remount, so we
have both set/clear in one function.

The original idea was probably to have prepare/cleanup wrapped but I
don't see much value to have the trivial wrapper.

  reply	other threads:[~2020-07-22 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-22  9:00 [PATCH] btrfs: open-code remount flag setting in btrfs_remount Johannes Thumshirn
2020-07-22 14:15 ` David Sterba [this message]
2020-07-30  5:07 ` Anand Jain

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=20200722141533.GW3703@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=johannes.thumshirn@wdc.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 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.