summaryrefslogtreecommitdiff
path: root/super1.c
diff options
context:
space:
mode:
authorGuoqing Jiang <gqjiang@suse.com>2016-05-09 10:22:58 +0800
committerJes Sorensen <Jes.Sorensen@redhat.com>2016-05-09 14:59:59 -0400
commitbbc24bb35020793b9e6fa2111b15882f0dbfe36e (patch)
treeaae1f0873f7c7ac75a21bb839a52d6963962af14 /super1.c
parent261b57fe219f7ebd37cf903c3696e9ea558536eb (diff)
downloadmdadm-bbc24bb35020793b9e6fa2111b15882f0dbfe36e.tar.gz
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 <gqjiang@suse.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Diffstat (limited to 'super1.c')
-rw-r--r--super1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/super1.c b/super1.c
index 972b470..fa93367 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;
}