linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: submit superblock io with REQ_META and REQ_PRIO
Date: Mon, 21 Aug 2017 12:00:33 -0700	[thread overview]
Message-ID: <20170821190033.GA26279@lim.localdomain> (raw)
In-Reply-To: <20170821154227.13644-1-dsterba@suse.com>

On Mon, Aug 21, 2017 at 05:42:27PM +0200, David Sterba wrote:
> The superblock is also metadata of the filesystem so the relevant IO
> should be tagged as such. We also tag it as high priority, as it's the
> last block committed for metadata from a given transaction. Any delays
> would effectively block the whole transaction, also blocking any other
> operation holding the device_list_mutex.
> 

Reviewed-by: Liu Bo <bo.li.liu@oracle.com>

-liubo

> Signed-off-by: David Sterba <dsterba@suse.com>
> ---
>  fs/btrfs/disk-io.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 90b967ae46d0..27d458640536 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -3433,9 +3433,10 @@ static int write_dev_supers(struct btrfs_device *device,
>  		 */
>  		if (i == 0) {
>  			ret = btrfsic_submit_bh(REQ_OP_WRITE,
> -						REQ_SYNC | REQ_FUA, bh);
> +				REQ_SYNC | REQ_FUA | REQ_META | REQ_PRIO, bh);
>  		} else {
> -			ret = btrfsic_submit_bh(REQ_OP_WRITE, REQ_SYNC, bh);
> +			ret = btrfsic_submit_bh(REQ_OP_WRITE,
> +				REQ_SYNC | REQ_META | REQ_PRIO, bh);
>  		}
>  		if (ret)
>  			errors++;
> -- 
> 2.14.0
> 

      parent reply	other threads:[~2017-08-21 19:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 15:42 [PATCH v2] btrfs: submit superblock io with REQ_META and REQ_PRIO David Sterba
2017-08-21 17:31 ` Josef Bacik
2017-08-21 19:00 ` Liu Bo [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=20170821190033.GA26279@lim.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=dsterba@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;
as well as URLs for NNTP newsgroup(s).