Skip to contentSkip to conversation

md/raid10: optimize read_balance() for 'far offset' arrays

PATCH Superseded Namhyung Kim 1 participant 1 message Jun 8, 2011 MD RAID

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 md/raid10: optimize read_balance() for 'far offset' arrays

If @conf->far_offset > 0, there is only 1 stripe so that we can treat the array same as 'near' arrays.

---
 drivers/md/raid10.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/md/raid10.c +1 -1
index 6e846688962f..fc56bdd8c3fb 100644
@@ -531,7 +531,7 @@ retry:
 			break;
 
 		/* for far > 1 always use the lowest address */
-		if (conf->far_copies > 1)
+		if (conf->far_copies > 1 && conf->far_offset == 0)
 			new_distance = r10_bio->devs[slot].addr;
 		else
 			new_distance = abs(r10_bio->devs[slot].addr -
Signature · 1 line
1.7.5.2