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