[PATCH 07/10] FIX: Do not use layout for raid4 and raid0 while geo map computing

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

 



After takeover layout has no matter for computing geo map for raid0 and raid4.
Set layout to 0 for such cases.
It can happen after takeover operation when not whole array information is reread.

Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
---

 restripe.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/restripe.c b/restripe.c
index 3074693..dcce3cc 100644
--- a/restripe.c
+++ b/restripe.c
@@ -43,6 +43,11 @@ static int geo_map(int block, unsigned long long stripe, int raid_disks,
 	 */
 	int pd;
 
+	/* layout has no matter for raid0 and raid4 */
+	if ((level == 0) ||
+	    (level == 4))
+		layout = 0;
+
 	switch(level*100 + layout) {
 	case 000:
 	case 400:

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux