From 4dd968cc546aadc168efa0c6dd96d789a7b0a08f Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 14 Mar 2011 18:56:16 +1100 Subject: 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 --- managemon.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'managemon.c') 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; -- cgit v1.2.1