From: Xiao Ni Date: Tue, 22 Dec 2015 03:09:34 +0000 (+0800) Subject: Check and remove bitmap first when reshape to raid0 X-Git-Tag: mdadm-3.4~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7cf9699dc0570ab4bce6d077ba51c329644cf7e;p=thirdparty%2Fmdadm.git Check and remove bitmap first when reshape to raid0 If reshape one raid device with bitmap to raid0, the reshape progress will start. But it'll fail and lose some components. So it should remove bitmap first. Signed-off-by: Xiao Ni Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 6dfb9c9c..89e4c341 100755 --- a/Grow.c +++ b/Grow.c @@ -1590,6 +1590,15 @@ int Grow_reshape(char *devname, int fd, pr_err("Cannot increase raid-disks on this array beyond %d\n", st->max_devs); return 1; } + if (s->level == 0 && + (array.state & (1<