[PATCH 2/2] raid5: For write performance, remove REQ_SYNC when write was odirect.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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
?韬{.n?????%??檩??w?{.n???{饼?z鳐??骅w*jg????????G??⒏⒎?:+v????????????"??????


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux