]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
mdadm: let cluster raid could also add disk within incremental mode
authorGuoqing Jiang <gqjiang@suse.com>
Tue, 1 Dec 2015 16:30:09 +0000 (00:30 +0800)
committerNeilBrown <neilb@suse.com>
Wed, 16 Dec 2015 02:23:54 +0000 (13:23 +1100)
For cluster raid, the disc.state need to be changed accordingly under
incremental mode.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Incremental.c

index 781d27defbfda382970bedec0506e824c27cb4d1..7afa7d77485a5bca21bc97e389bbf96e9760b273 100644 (file)
@@ -444,6 +444,10 @@ int Incremental(struct mddev_dev *devlist, struct context *c,
                /* add disk needs to know about containers */
                if (st->ss->external)
                        sra->array.level = LEVEL_CONTAINER;
+
+               if (info.array.state & (1 << MD_SB_CLUSTERED))
+                       info.disk.state |= (1 << MD_DISK_CLUSTER_ADD);
+
                err = add_disk(mdfd, st, sra, &info);
                if (err < 0 && errno == EBUSY) {
                        /* could be another device present with the same