summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.c
diff options
context:
space:
mode:
authorMilan Broz2006-10-03 10:15:36 +0200
committerLinus Torvalds2006-10-03 17:04:15 +0200
commit8757b7764f13e336f3c0eb1f634440d4ee4c3a67 (patch)
treec91b00ace6ee438a9e447bce311808a698e9d487 /drivers/md/dm.c
parent[PATCH] dm: add debug macro (diff)
downloadkernel-qcow2-linux-8757b7764f13e336f3c0eb1f634440d4ee4c3a67.tar.gz
kernel-qcow2-linux-8757b7764f13e336f3c0eb1f634440d4ee4c3a67.tar.xz
kernel-qcow2-linux-8757b7764f13e336f3c0eb1f634440d4ee4c3a67.zip
[PATCH] dm table: add target preresume
This patch adds a target preresume hook. It is called before the targets are resumed and if it returns an error the resume gets cancelled. The crypt target will use this to indicate that it is unable to process I/O because no encryption key has been supplied. Signed-off-by: Milan Broz <mbroz@redhat.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>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r--drivers/md/dm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index 883860c3565b..aeb63a3ac330 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1360,7 +1360,9 @@ int dm_resume(struct mapped_device *md)
if (!map || !dm_table_get_size(map))
goto out;
- dm_table_resume_targets(map);
+ r = dm_table_resume_targets(map);
+ if (r)
+ goto out;
down_write(&md->io_lock);
clear_bit(DMF_BLOCK_IO, &md->flags);