* [PATCH 1 of 2] dm-raid: set recovery flags on resume
@ 2012-04-16 23:45 Jonathan Brassow
0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2012-04-16 23:45 UTC (permalink / raw)
To: dm-devel, linux-raid; +Cc: agk, neilb
Set recovery flags so that recovery restarts when DM device is resumed.
When a device-mapper device is suspended, all I/O must stop. This is done by
calling 'md_stop_writes' and 'mddev_suspend'. These calls in-turn manipulate
the recovery flags - including setting 'MD_RECOVERY_FROZEN'. The DM device
may have been suspended while recovery was not yet complete, so the process
needs to pick-up where it left off. Since 'mddev_resume' does not unset
'MD_RECOVERY_FROZEN' and set 'MD_RECOVERY_NEEDED', we must do it ourselves before
calling 'mddev_resume'.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Index: linux-upstream/drivers/md/dm-raid.c
===================================================================
--- linux-upstream.orig/drivers/md/dm-raid.c
+++ linux-upstream/drivers/md/dm-raid.c
@@ -1255,9 +1255,11 @@ static void raid_resume(struct dm_target
if (!rs->bitmap_loaded) {
bitmap_load(&rs->md);
rs->bitmap_loaded = 1;
- } else
+ } else {
+ set_bit(MD_RECOVERY_NEEDED, &rs->md.recovery);
+ clear_bit(MD_RECOVERY_FROZEN, &rs->md.recovery);
md_wakeup_thread(rs->md.thread);
-
+ }
mddev_resume(&rs->md);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-04-16 23:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-16 23:45 [PATCH 1 of 2] dm-raid: set recovery flags on resume Jonathan Brassow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).