linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2 V1] raid5: For odirect-write performance, not set  STRIPE_PREREAD_ACTIVE.
@ 2012-07-16  8:33 majianpeng
  2012-07-17  2:02 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-07-16  8:33 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, viro

Using flag REQ_NOIDLE to difference odirect-write and sync_write.

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

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 04348d7..29edaf0 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -4113,7 +4113,10 @@ static void make_request(struct mddev *mddev, struct bio * bi)
 			finish_wait(&conf->wait_for_overlap, &w);
 			set_bit(STRIPE_HANDLE, &sh->state);
 			clear_bit(STRIPE_DELAYED, &sh->state);
-			if ((bi->bi_rw & REQ_SYNC) &&
+			/* Difference odirect-write between regular file
+			 * and block-device
+			 */
+			if ((bi->bi_rw & REQ_NOIDLE) &&
 			    !test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
 				atomic_inc(&conf->preread_active_stripes);
 			mddev_check_plugged(mddev);
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-17  2:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-16  8:33 [PATCH 2/2 V1] raid5: For odirect-write performance, not set STRIPE_PREREAD_ACTIVE majianpeng
2012-07-17  2:02 ` NeilBrown

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).