From: NeilBrown Date: Thu, 28 Jan 2010 00:48:03 +0000 (+1100) Subject: Grow: If bitmap interferes with grow, report this. X-Git-Tag: mdadm-3.1.2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39bbb392022d7d3008a0695755ced84fa49d2231;p=thirdparty%2Fmdadm.git Grow: If bitmap interferes with grow, report this. If a bitmap exists on an array, then current kernels cannot grow that array. So when we try to grow an array, test for EBUSY and if a bitmap is present, report that the bitmap needs to be removed. Resolves-Debian-Bug: 534571 Signed-off-by: NeilBrown --- diff --git a/Grow.c b/Grow.c index 8d9853b2..efa8c472 100644 --- a/Grow.c +++ b/Grow.c @@ -563,8 +563,12 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file, } else rv = ioctl(fd, SET_ARRAY_INFO, &array); if (rv != 0) { + int err = errno; fprintf(stderr, Name ": Cannot set device size for %s: %s\n", - devname, strerror(errno)); + devname, strerror(err)); + if (err == EBUSY && + (array.state & (1<