Skip to content

Commit

Permalink
MD: no sync IO while suspended
Browse files Browse the repository at this point in the history
Disallow resync I/O while the RAID array is suspended.

Recovery, resync, and metadata I/O should not be allowed while a device is
suspended.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
Jonathan Brassow authored and NeilBrown committed Jun 8, 2011
1 parent 629acb6 commit 68866e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -7045,7 +7045,6 @@ void md_do_sync(mddev_t *mddev)
}
EXPORT_SYMBOL_GPL(md_do_sync);


static int remove_and_add_spares(mddev_t *mddev)
{
mdk_rdev_t *rdev;
Expand Down Expand Up @@ -7157,6 +7156,9 @@ static void reap_sync_thread(mddev_t *mddev)
*/
void md_check_recovery(mddev_t *mddev)
{
if (mddev->suspended)
return;

if (mddev->bitmap)
bitmap_daemon_work(mddev);

Expand Down

0 comments on commit 68866e4

Please sign in to comment.