linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: majianpeng <majianpeng@gmail.com>
To: "Jens Axboe" <axboe@kernel.dk>
Cc: viro <viro@ZenIV.linux.org.uk>,
	linux-raid <linux-raid@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	"Neil Brown" <neilb@suse.de>
Subject: Re: Re: [PATCH 1/2 V1] [PATCH] fs/block-dev.c:fix performance regression in O_DIRECT writes to md block devices
Date: Thu, 2 Aug 2012 14:48:41 +0800	[thread overview]
Message-ID: <201208021448392819731@gmail.com> (raw)
In-Reply-To: 20120717130434.670e51e9@notabene.brown

On 2012-07-17 11:04 NeilBrown <neilb@suse.de> Wrote:
>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);
>
>

How about this patch? apply or reject? Thanks!

  parent reply	other threads:[~2012-08-02  6:48 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
2012-07-17  5:07   ` majianpeng
2012-08-02  6:48   ` majianpeng [this message]
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=201208021448392819731@gmail.com \
    --to=majianpeng@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --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).