diff options
author | NeilBrown <neilb@suse.de> | 2011-03-14 18:56:16 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-15 15:10:32 +1100 |
commit | b0edee6efb43aeafe0dfaa35232012f434ec8573 (patch) | |
tree | c51f4b586fcbe2800fa8735f14a1f6d196edea53 /managemon.c | |
parent | 258c3e921b5efae10116857971a9a2bfbfe99d4b (diff) |
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.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/managemon.c b/managemon.c index 49c90346..8684e273 100644 --- a/managemon.c +++ b/managemon.c @@ -312,16 +312,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; |