From: Guoqing Jiang Date: Mon, 9 May 2016 02:22:58 +0000 (+0800) Subject: super1: make the check for NodeNumUpdate more accurate X-Git-Tag: mdadm-4.0~93 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbc24bb35020793b9e6fa2111b15882f0dbfe36e;p=thirdparty%2Fmdadm.git super1: make the check for NodeNumUpdate more accurate We missed to check the version is BITMAP_MAJOR_CLUSTERED or not, otherwise mdadm can't create array with other 1.x metadatas (1.0 and 1.1). Signed-off-by: Guoqing Jiang Signed-off-by: Jes Sorensen --- diff --git a/super1.c b/super1.c index 972b4700..fa933676 100644 --- a/super1.c +++ b/super1.c @@ -2389,7 +2389,7 @@ static int write_bitmap1(struct supertype *st, int fd, enum bitmap_update update break; case NodeNumUpdate: /* cluster md only supports superblock 1.2 now */ - if (st->minor_version != 2) { + if (st->minor_version != 2 && bms->version == BITMAP_MAJOR_CLUSTERED) { pr_err("Warning: cluster md only works with superblock 1.2\n"); return -EINVAL; }