diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2016-05-09 04:22:58 +0200 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@redhat.com> | 2016-05-09 20:59:59 +0200 |
commit | bbc24bb35020793b9e6fa2111b15882f0dbfe36e (patch) | |
tree | aae1f0873f7c7ac75a21bb839a52d6963962af14 /super1.c | |
parent | super1: don't update node nums if it is not more than 1 (diff) | |
download | mdadm-bbc24bb35020793b9e6fa2111b15882f0dbfe36e.tar.xz mdadm-bbc24bb35020793b9e6fa2111b15882f0dbfe36e.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |