linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs - 1"
@ 2012-04-17  8:49 majianpeng
  2012-04-17  9:11 ` NeilBrown
  0 siblings, 1 reply; 2+ messages in thread
From: majianpeng @ 2012-04-17  8:49 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid

From 2c637bca4e50e87f7b4e6b3abce27f8cd935fd92 Mon Sep 17 00:00:00 2001
From: majianpeng <majianpeng@gmail.com>
Date: Tue, 17 Apr 2012 16:47:07 +0800
Subject: [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs -
 1".


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

diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index c8dbb84..5734d92 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -601,7 +601,7 @@ static int raid10_mergeable_bvec(struct request_queue *q,
 	unsigned int bio_sectors = bvm->bi_size >> 9;
 
 	if (conf->near_copies < conf->raid_disks) {
-		max = (chunk_sectors - ((sector & (chunk_sectors - 1))
+		max = (chunk_sectors - ((sector & conf->chunk_mask)
 					+ bio_sectors)) << 9;
 		if (max < 0)
 			/* bio_add cannot handle a negative return */
-- 
1.7.5.4

 				
--------------
majianpeng
2012-04-17


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

end of thread, other threads:[~2012-04-17  9:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-17  8:49 [PATCH] md/raid10:using conf->chunk_mask instead "chunk_secotrs - 1" majianpeng
2012-04-17  9:11 ` 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).