mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 18:40:10 +00:00
md: MD_RECOVERY_NEEDED is set for mddev->recovery
commit 82a301cb0e upstream.
Fixes: 90f5f7ad4f38("md: Wait for md_check_recovery before attempting device
removal.")
Reviewed-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
1d3124821f
commit
ccd7bd29c2
@@ -6771,7 +6771,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
|
|||||||
/* need to ensure recovery thread has run */
|
/* need to ensure recovery thread has run */
|
||||||
wait_event_interruptible_timeout(mddev->sb_wait,
|
wait_event_interruptible_timeout(mddev->sb_wait,
|
||||||
!test_bit(MD_RECOVERY_NEEDED,
|
!test_bit(MD_RECOVERY_NEEDED,
|
||||||
&mddev->flags),
|
&mddev->recovery),
|
||||||
msecs_to_jiffies(5000));
|
msecs_to_jiffies(5000));
|
||||||
if (cmd == STOP_ARRAY || cmd == STOP_ARRAY_RO) {
|
if (cmd == STOP_ARRAY || cmd == STOP_ARRAY_RO) {
|
||||||
/* Need to flush page cache, and ensure no-one else opens
|
/* Need to flush page cache, and ensure no-one else opens
|
||||||
|
|||||||
Reference in New Issue
Block a user