diff options
-rw-r--r-- | include/linux/device-mapper.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index 89ff2df40240..c1ba76c7c0e5 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -45,6 +45,8 @@ typedef void (*dm_dtr_fn) (struct dm_target *ti); | |||
45 | */ | 45 | */ |
46 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | 46 | typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, |
47 | union map_info *map_context); | 47 | union map_info *map_context); |
48 | typedef int (*dm_map_request_fn) (struct dm_target *ti, struct request *clone, | ||
49 | union map_info *map_context); | ||
48 | 50 | ||
49 | /* | 51 | /* |
50 | * Returns: | 52 | * Returns: |
@@ -57,6 +59,9 @@ typedef int (*dm_map_fn) (struct dm_target *ti, struct bio *bio, | |||
57 | typedef int (*dm_endio_fn) (struct dm_target *ti, | 59 | typedef int (*dm_endio_fn) (struct dm_target *ti, |
58 | struct bio *bio, int error, | 60 | struct bio *bio, int error, |
59 | union map_info *map_context); | 61 | union map_info *map_context); |
62 | typedef int (*dm_request_endio_fn) (struct dm_target *ti, | ||
63 | struct request *clone, int error, | ||
64 | union map_info *map_context); | ||
60 | 65 | ||
61 | typedef void (*dm_flush_fn) (struct dm_target *ti); | 66 | typedef void (*dm_flush_fn) (struct dm_target *ti); |
62 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); | 67 | typedef void (*dm_presuspend_fn) (struct dm_target *ti); |
@@ -75,6 +80,13 @@ typedef int (*dm_ioctl_fn) (struct dm_target *ti, unsigned int cmd, | |||
75 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, | 80 | typedef int (*dm_merge_fn) (struct dm_target *ti, struct bvec_merge_data *bvm, |
76 | struct bio_vec *biovec, int max_size); | 81 | struct bio_vec *biovec, int max_size); |
77 | 82 | ||
83 | /* | ||
84 | * Returns: | ||
85 | * 0: The target can handle the next I/O immediately. | ||
86 | * 1: The target can't handle the next I/O immediately. | ||
87 | */ | ||
88 | typedef int (*dm_busy_fn) (struct dm_target *ti); | ||
89 | |||
78 | void dm_error(const char *message); | 90 | void dm_error(const char *message); |
79 | 91 | ||
80 | /* | 92 | /* |
@@ -107,7 +119,9 @@ struct target_type { | |||
107 | dm_ctr_fn ctr; | 119 | dm_ctr_fn ctr; |
108 | dm_dtr_fn dtr; | 120 | dm_dtr_fn dtr; |
109 | dm_map_fn map; | 121 | dm_map_fn map; |
122 | dm_map_request_fn map_rq; | ||
110 | dm_endio_fn end_io; | 123 | dm_endio_fn end_io; |
124 | dm_request_endio_fn rq_end_io; | ||
111 | dm_flush_fn flush; | 125 | dm_flush_fn flush; |
112 | dm_presuspend_fn presuspend; | 126 | dm_presuspend_fn presuspend; |
113 | dm_postsuspend_fn postsuspend; | 127 | dm_postsuspend_fn postsuspend; |
@@ -117,6 +131,7 @@ struct target_type { | |||
117 | dm_message_fn message; | 131 | dm_message_fn message; |
118 | dm_ioctl_fn ioctl; | 132 | dm_ioctl_fn ioctl; |
119 | dm_merge_fn merge; | 133 | dm_merge_fn merge; |
134 | dm_busy_fn busy; | ||
120 | }; | 135 | }; |
121 | 136 | ||
122 | struct io_restrictions { | 137 | struct io_restrictions { |