diff options
author | Guoqing Jiang <gqjiang@suse.com> | 2015-12-01 17:30:09 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.com> | 2015-12-16 03:23:54 +0100 |
commit | 41dbb4da227946441ebb7d211bae06dbfac311b8 (patch) | |
tree | fed76baeac027224ab3a31c0d0d1be5eb151636b /Incremental.c | |
parent | recreate journal in mdadm (diff) | |
download | mdadm-41dbb4da227946441ebb7d211bae06dbfac311b8.tar.xz mdadm-41dbb4da227946441ebb7d211bae06dbfac311b8.zip |
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>
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 |