diff options
author | Milan Broz <mbroz@redhat.com> | 2006-10-03 04:15:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:15 -0400 |
commit | 8757b7764f13e336f3c0eb1f634440d4ee4c3a67 (patch) | |
tree | c91b00ace6ee438a9e447bce311808a698e9d487 /drivers/md/dm.c | |
parent | cc1092019ce3d9b3e85a285b41e852ff94a6b590 (diff) |
[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.c | 4 |
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) | |||
1360 | if (!map || !dm_table_get_size(map)) | 1360 | if (!map || !dm_table_get_size(map)) |
1361 | goto out; | 1361 | goto out; |
1362 | 1362 | ||
1363 | dm_table_resume_targets(map); | 1363 | r = dm_table_resume_targets(map); |
1364 | if (r) | ||
1365 | goto out; | ||
1364 | 1366 | ||
1365 | down_write(&md->io_lock); | 1367 | down_write(&md->io_lock); |
1366 | clear_bit(DMF_BLOCK_IO, &md->flags); | 1368 | clear_bit(DMF_BLOCK_IO, &md->flags); |