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 <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
This commit is contained in:
Guoqing Jiang 2015-12-02 00:30:09 +08:00 committed by NeilBrown
parent 01290056d0
commit 41dbb4da22
1 changed files with 4 additions and 0 deletions

View 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