[PATCH 1/2] md/raid5:Change the order of md_write_start() and chunk_aligned_read() in function make_request().

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


If exec chunk_aligned_read(),it did not neccessary to exec
md_write_start().

Signed-off-by: majianpeng <majianpeng@xxxxxxxxx>
---
 drivers/md/raid5.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index d267672..5653125 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3978,13 +3978,13 @@ static void make_request(struct mddev *mddev, struct bio * bi)
 		return;
 	}
 
-	md_write_start(mddev, bi);
-
 	if (rw == READ &&
 	     mddev->reshape_position == MaxSector &&
 	     chunk_aligned_read(mddev,bi))
 		return;
 
+	md_write_start(mddev, bi);
+
 	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



--------------
majianpeng?韬{.n?????%??檩??w?{.n???{炳盯w???塄}?财??j:+v??????2??璀??摺?囤??z夸z罐?+?????w棹f



[ATA RAID]     [Linux SCSI Target Infrastructure]     [Managing RAID on Linux]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device-Mapper]     [Kernel]     [Linux Books]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Photos]     [Yosemite Photos]     [Yosemite News]     [AMD 64]     [Linux Networking]

Add to Google Powered by Linux