All of lore.kernel.org
 help / color / mirror / Atom feed
From: majianpeng <majianpeng@gmail.com>
To: Neil Brown <neilb@suse.de>, viro <viro@ZenIV.linux.org.uk>
Cc: linux-raid <linux-raid@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 2/2] raid5: For write performance, remove REQ_SYNC when write was odirect.
Date: Mon, 16 Jul 2012 09:31:55 +0800	[thread overview]
Message-ID: <201207160931507187344@gmail.com> (raw)

In commit e9c7469bb4f502dafc092166201bea1ad5fc0fbf:
Tejun Heo introduced "implment REQ_FLUSH/FUA support".
But for direct-write-blocks, it maybe for other purpose which like the
regular file.
And this flag will set STRIPE_PREREAD_ACTIVE which decreaed the change
to full write.

But this patch remove REQ_SYNC only judging the WRITE_ODIRECT,it will
contail regular file.So it maybe not correctly.
How can difference odriect_write between regular file or block file?

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
---
 drivers/md/raid5.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 04348d7..8d2d4d1 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4010,6 +4010,9 @@ static void make_request(struct mddev *mddev, struct bio * bi)
 	     chunk_aligned_read(mddev,bi))
 		return;
 
+	if (bi->bi_rw & WRITE_ODIRECT)
+		bi->bi_rw &= ~REQ_SYNC;
+
 	logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
 	last_sector = bi->bi_sector + (bi->bi_size>>9);
 	bi->bi_next = NULL;
-- 
1.7.5.4

             reply	other threads:[~2012-07-16  1:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-16  1:31 majianpeng [this message]
2012-07-16  5:40 ` [PATCH 2/2] raid5: For write performance, remove REQ_SYNC when write was odirect NeilBrown
2012-07-16  5:47   ` majianpeng
2012-07-16  6:42   ` majianpeng
2012-07-16  7:07     ` NeilBrown
2012-07-16  7:11       ` majianpeng
2012-07-16  7:30         ` NeilBrown
2012-07-16  8:14           ` majianpeng

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=201207160931507187344@gmail.com \
    --to=majianpeng@gmail.com \
    --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 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.