md-cluster: remove a disk asynchronously from cluster environment
authorGuoqing Jiang <gqjiang@suse.com>
Sun, 20 Dec 2015 23:50:59 +0000 (10:50 +1100)
committerNeilBrown <neilb@suse.com>
Wed, 6 Jan 2016 00:38:36 +0000 (11:38 +1100)
commit659b254fa7392e32b59a30d4b61fb12c4cd440ff
tree7e9a11ac79c881e7b6f712e804d35fda95cfbb07
parentac277c6a8a39bc50f891a3477625330c276bd7f5
md-cluster: remove a disk asynchronously from cluster environment

For cluster raid, if one disk couldn't be reach in one node, then
other nodes would receive the REMOVE message for the disk.

In receiving node, we can't call md_kick_rdev_from_array to remove
the disk from array synchronously since the disk might still be busy
in this node. So let's set a ClusterRemove flag on the disk, then
let the thread to do the removal job eventually.

Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.com>
drivers/md/md-cluster.c
drivers/md/md.c
drivers/md/md.h