From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guoqing Jiang Subject: [PATCH 1/4] mdadm: let cluster raid could also add disk within incremental mode Date: Wed, 2 Dec 2015 00:30:09 +0800 Message-ID: <1448987412-3932-1-git-send-email-gqjiang@suse.com> Return-path: Sender: linux-raid-owner@vger.kernel.org To: neilb@suse.com, linux-raid@vger.kernel.org Cc: rgoldwyn@suse.com, Guoqing Jiang List-Id: linux-raid.ids For cluster raid, the disc.state need to be changed accordingly under incremental mode. Signed-off-by: Goldwyn Rodrigues Signed-off-by: Guoqing Jiang --- Incremental.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Incremental.c b/Incremental.c index 781d27d..7afa7d7 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 -- 2.1.4