linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: majianpeng <majianpeng@gmail.com>
Cc: viro <viro@ZenIV.linux.org.uk>, axboe <axboe@fusionio.com>,
	linux-raid <linux-raid@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 1/2 V1] [PATCH] fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices
Date: Tue, 17 Jul 2012 13:04:34 +1000	[thread overview]
Message-ID: <20120717130434.670e51e9@notabene.brown> (raw)
In-Reply-To: <201207161422001403795@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1503 bytes --]

On Mon, 16 Jul 2012 14:22:03 +0800 majianpeng <majianpeng@gmail.com> wrote:

> For regular file, write operaion used blk_plug function.But for block
> file,write operation did not use blk_plug.
> This patch is also for write-cache mode for block-device.
> 
> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>

Reviewed-by: NeilBrown <neilb@suse.de>

Will you take this Jens?  Though mail to you seem to be bouncing:

<axboe@fusionio.com>: host mail.fusionio.com[10.101.1.19] said: 554 5.4.6 Hop
    count exceeded - possible mail loop (in reply to end of DATA command)

so I'm not sure you'll even see this :-(

NeilBrown

> ---
>  fs/block_dev.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/block_dev.c b/fs/block_dev.c
> index c2bbe1f..cf10778 100644
> --- a/fs/block_dev.c
> +++ b/fs/block_dev.c
> @@ -1579,9 +1579,11 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
>  {
>  	struct file *file = iocb->ki_filp;
>  	ssize_t ret;
> +	struct blk_plug plug;
>  
>  	BUG_ON(iocb->ki_pos != pos);
>  
> +	blk_start_plug(&plug);
>  	ret = __generic_file_aio_write(iocb, iov, nr_segs, &iocb->ki_pos);
>  	if (ret > 0 || ret == -EIOCBQUEUED) {
>  		ssize_t err;
> @@ -1590,6 +1592,7 @@ ssize_t blkdev_aio_write(struct kiocb *iocb, const struct iovec *iov,
>  		if (err < 0 && ret > 0)
>  			ret = err;
>  	}
> +	blk_finish_plug(&plug);
>  	return ret;
>  }
>  EXPORT_SYMBOL_GPL(blkdev_aio_write);


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

  reply	other threads:[~2012-07-17  3:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16  6:22 [PATCH 1/2 V1] [PATCH] fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices majianpeng
2012-07-17  3:04 ` NeilBrown [this message]
2012-07-17  5:07   ` majianpeng
2012-08-02  6:48   ` majianpeng
2012-08-02  7:51     ` Jens Axboe

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=20120717130434.670e51e9@notabene.brown \
    --to=neilb@suse.de \
    --cc=axboe@fusionio.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=majianpeng@gmail.com \
    --cc=viro@ZenIV.linux.org.uk \
    /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).