summaryrefslogtreecommitdiff
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
authorAlasdair G. Kergon <agk@redhat.com>2005-01-25 04:44:38 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-25 04:44:38 -0800
commit0c4b76ba2f33c507d0578f3bce5fb9a52b8921bf (patch)
treebaf34a4aca160b4f95747ef85885c452fa152aea /include/linux/device-mapper.h
parente839d3885707d054ffb5401d017f56cae4b7d78e (diff)
[PATCH] device-mapper: Add presuspend hook
Add optional callback before each device gets suspended (called 'presuspend'). Rename existing callback used by dm-mirror from 'suspend' to 'postsuspend'. dm-multipath will use the new callback. (Any kernel module using device-mapper must be recompiled after this patch.) 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 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index a6282ab22b8c..956da05fd52c 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -52,7 +52,8 @@ typedef int (*dm_endio_fn) (struct dm_target *ti,
struct bio *bio, int error,
union map_info *map_context);
-typedef void (*dm_suspend_fn) (struct dm_target *ti);
+typedef void (*dm_presuspend_fn) (struct dm_target *ti);
+typedef void (*dm_postsuspend_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,
@@ -82,7 +83,8 @@ struct target_type {
dm_dtr_fn dtr;
dm_map_fn map;
dm_endio_fn end_io;
- dm_suspend_fn suspend;
+ dm_presuspend_fn presuspend;
+ dm_postsuspend_fn postsuspend;
dm_resume_fn resume;
dm_status_fn status;
dm_message_fn message;