From: Guoqing Jiang Date: Tue, 1 Dec 2015 16:30:09 +0000 (+0800) Subject: mdadm: let cluster raid could also add disk within incremental mode X-Git-Tag: mdadm-3.4~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41dbb4da227946441ebb7d211bae06dbfac311b8;p=thirdparty%2Fmdadm.git mdadm: let cluster raid could also add disk within incremental mode For cluster raid, the disc.state need to be changed accordingly under incremental mode. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang Signed-off-by: NeilBrown --- diff --git a/Incremental.c b/Incremental.c index 781d27de..7afa7d77 100644 --- a/Incremental.c +++ b/Incremental.c @@ -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