[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>
This commit is contained in:
committed by
Linus Torvalds
parent
cc1092019c
commit
8757b7764f
@@ -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;
|
||||
|
Reference in New Issue
Block a user