diff options
author | NeilBrown <neilb@suse.de> | 2013-04-24 01:42:41 (GMT) |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-04-24 01:42:41 (GMT) |
commit | 746d3207ae2f9cf71fd87c9df884aa104fdaafa6 (patch) | |
tree | 6ce6cc0b1d9f147bbc2e3b72cf6e52da922d2f7f /drivers/md/dm-bio-prison.c | |
parent | d87f064f5874ba60814c6ccac67104761be5b26c (diff) | |
download | linux-fsl-qoriq-746d3207ae2f9cf71fd87c9df884aa104fdaafa6.tar.xz |
md: use common code for all calls to ->hot_remove_disk()
slot_store and remove_and_add_spares both call ->hot_remove_disk(),
but with slightly different tests and consequences, which is
at least untidy and might be buggy.
So modify remove_and_add_spaces() so that it can be asked
to remove a specific device, and call it from slot_store().
We also clear the Blocked flag to ensure that doesn't prevent
removal. The purpose of Blocked is to prevent automatic removal
by the kernel before an error is acknowledged.
If the array is read/write then user-space would have not reason
to remove a device unless it was known to be 'spare' or 'faulty' in
which it would have already cleared the Blocked flag.
If the array is read-only, the flag might still be blocked, but
there is no harm in clearing the flag for read-only arrays.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/dm-bio-prison.c')
0 files changed, 0 insertions, 0 deletions