summaryrefslogtreecommitdiff
path: root/managemon.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2011-03-14 18:56:16 +1100
committerNeilBrown <neilb@suse.de>2011-03-14 18:56:16 +1100
commit4dd968cc546aadc168efa0c6dd96d789a7b0a08f (patch)
treef91869682e19931df8a96c98fc514b18d8a45622 /managemon.c
parentf50ae22e45848217d989f58ece290c1e8cc6acc0 (diff)
downloadmdadm-4dd968cc546aadc168efa0c6dd96d789a7b0a08f.tar.gz
ddf: implement remove_from_super
This is needed to remove devices from mdmon's knowledge when the device is removed from the md container. Now that ddf have a remove_from_super we don't need the code that allows some personalities not to implement this. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'managemon.c')
-rw-r--r--managemon.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/managemon.c b/managemon.c
index 19e5f41..15b6e69 100644
--- a/managemon.c
+++ b/managemon.c
@@ -320,16 +320,15 @@ static void remove_disk_from_container(struct supertype *st, struct mdinfo *sd)
.raid_disk = -1,
.state = 0,
};
- /* nothing to do if super type handler does not support
- * remove disk primitive
- */
- if (!st->ss->remove_from_super)
- return;
dprintf("%s: remove %d:%d from container\n",
__func__, sd->disk.major, sd->disk.minor);
st->update_tail = &update;
st->ss->remove_from_super(st, &dk);
+ /* FIXME this write_init_super shouldn't be here.
+ * We have it after add_to_super to write to new device,
+ * but with 'remove' we don't ant to write to that device!
+ */
st->ss->write_init_super(st);
queue_metadata_update(update);
st->update_tail = NULL;