diff options
author | NeilBrown <neilb@suse.com> | 2017-03-27 14:36:56 +1100 |
---|---|---|
committer | Jes Sorensen <Jes.Sorensen@gmail.com> | 2017-03-28 14:32:35 -0400 |
commit | 1ab9ed2afb7ca50c4f922a0b85c4e6631becde02 (patch) | |
tree | a6665958e0403b661b81750434b0c23e0109abaf /mdadm.h | |
parent | fdd015696c2e2a6b234a92af564aea44b62e6a0d (diff) | |
download | mdadm-1ab9ed2afb7ca50c4f922a0b85c4e6631becde02.tar.gz |
Add 'force' flag to *hot_remove_disk().
In rare circumstances, the short period that *hot_remove_disk()
waits isn't long enough to IO to complete. This particularly happens
when a device is failing and many retries are still happening.
We don't want to increase the normal wait time for "mdadm --remove"
as that might be use just to test if a device is active or not, and a
delay would be problematic.
So allow "--force" to mean that mdadm should try extra hard for a
--remove to complete, waiting up to 5 seconds.
Note that this patch fixes a comment which claim the previous
wait time was half a second, where it was really 50msec.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@gmail.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1476,8 +1476,8 @@ extern int add_disk(int mdfd, struct supertype *st, struct mdinfo *sra, struct mdinfo *info); extern int remove_disk(int mdfd, struct supertype *st, struct mdinfo *sra, struct mdinfo *info); -extern int hot_remove_disk(int mdfd, unsigned long dev); -extern int sys_hot_remove_disk(int statefd); +extern int hot_remove_disk(int mdfd, unsigned long dev, int force); +extern int sys_hot_remove_disk(int statefd, int force); extern int set_array_info(int mdfd, struct supertype *st, struct mdinfo *info); unsigned long long min_recovery_start(struct mdinfo *array); |