From 8757b7764f13e336f3c0eb1f634440d4ee4c3a67 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 3 Oct 2006 01:15:36 -0700 Subject: [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 Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/device-mapper.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/device-mapper.h') diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index d44a99650af..8cbc46b8e3d 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h @@ -57,6 +57,7 @@ typedef int (*dm_endio_fn) (struct dm_target *ti, typedef void (*dm_presuspend_fn) (struct dm_target *ti); typedef void (*dm_postsuspend_fn) (struct dm_target *ti); +typedef int (*dm_preresume_fn) (struct dm_target *ti); typedef void (*dm_resume_fn) (struct dm_target *ti); typedef int (*dm_status_fn) (struct dm_target *ti, status_type_t status_type, @@ -92,6 +93,7 @@ struct target_type { dm_endio_fn end_io; dm_presuspend_fn presuspend; dm_postsuspend_fn postsuspend; + dm_preresume_fn preresume; dm_resume_fn resume; dm_status_fn status; dm_message_fn message; -- cgit v1.2.3