summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
authorGoldwyn Rodrigues <rgoldwyn@suse.com>2015-12-21 00:51:00 +0100
committerNeilBrown <neilb@suse.com>2016-01-06 01:38:42 +0100
commit54a88392cdd84b4a739ce3a986bfabfaff67d9d2 (patch)
tree790237579c448bc12a4f7be7f19dd6dc81815c61 /drivers/md/md.c
parentmd-cluster: remove a disk asynchronously from cluster environment (diff)
downloadlinux-54a88392cdd84b4a739ce3a986bfabfaff67d9d2.tar.xz
linux-54a88392cdd84b4a739ce3a986bfabfaff67d9d2.zip
md-cluster: Fix the remove sequence with the new MD reload code
The remove disk message does not need metadata_update_start(), but can be an independent message. 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 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 198e29dffb98..ab3995de0418 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -6134,15 +6134,11 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
{
char b[BDEVNAME_SIZE];
struct md_rdev *rdev;
- int ret = -1;
rdev = find_rdev(mddev, dev);
if (!rdev)
return -ENXIO;
- if (mddev_is_clustered(mddev))
- ret = md_cluster_ops->metadata_update_start(mddev);
-
if (rdev->raid_disk < 0)
goto kick_rdev;
@@ -6153,7 +6149,7 @@ static int hot_remove_disk(struct mddev *mddev, dev_t dev)
goto busy;
kick_rdev:
- if (mddev_is_clustered(mddev) && ret == 0)
+ if (mddev_is_clustered(mddev))
md_cluster_ops->remove_disk(mddev, rdev);
md_kick_rdev_from_array(rdev);
@@ -6162,9 +6158,6 @@ kick_rdev:
return 0;
busy:
- if (mddev_is_clustered(mddev) && ret == 0)
- md_cluster_ops->metadata_update_cancel(mddev);
-
printk(KERN_WARNING "md: cannot remove active disk %s from %s ...\n",
bdevname(rdev->bdev,b), mdname(mddev));
return -EBUSY;