summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorJun'ichi Nomura <j-nomura@ce.jp.nec.com>2006-03-27 01:17:51 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2006-05-01 12:03:43 -0700
commitebea8457d4b94864a818ae3e6a95655602244935 (patch)
treef969cee352134da3233019b04879502d222f60be /drivers/md
parentf6a731290ca18b31fd447989319eb913d9c308d8 (diff)
[PATCH] dm flush queue EINTR
If dm_suspend() is cancelled, bios already added to the deferred list need to be submitted. Otherwise they remain 'in limbo' until there's a dm_resume(). Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index d559569646bf..f6c8e8e4e8e2 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1098,6 +1098,7 @@ int dm_suspend(struct mapped_device *md, int do_lockfs)
{
struct dm_table *map = NULL;
DECLARE_WAITQUEUE(wait, current);
+ struct bio *def;
int r = -EINVAL;
down(&md->suspend_lock);
@@ -1157,9 +1158,11 @@ int dm_suspend(struct mapped_device *md, int do_lockfs)
/* were we interrupted ? */
r = -EINTR;
if (atomic_read(&md->pending)) {
+ clear_bit(DMF_BLOCK_IO, &md->flags);
+ def = bio_list_get(&md->deferred);
+ __flush_deferred_io(md, def);
up_write(&md->io_lock);
unlock_fs(md);
- clear_bit(DMF_BLOCK_IO, &md->flags);
goto out;
}
up_write(&md->io_lock);