aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device-mapper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/device-mapper.h')
-rw-r--r--include/linux/device-mapper.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 2970022faa63..272496d1fae4 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -193,6 +193,13 @@ struct dm_target {
193 char *error; 193 char *error;
194}; 194};
195 195
196/* Each target can link one of these into the table */
197struct dm_target_callbacks {
198 struct list_head list;
199 int (*congested_fn) (struct dm_target_callbacks *, int);
200 void (*unplug_fn)(struct dm_target_callbacks *);
201};
202
196int dm_register_target(struct target_type *t); 203int dm_register_target(struct target_type *t);
197void dm_unregister_target(struct target_type *t); 204void dm_unregister_target(struct target_type *t);
198 205
@@ -269,6 +276,11 @@ int dm_table_add_target(struct dm_table *t, const char *type,
269 sector_t start, sector_t len, char *params); 276 sector_t start, sector_t len, char *params);
270 277
271/* 278/*
279 * Target_ctr should call this if it needs to add any callbacks.
280 */
281void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb);
282
283/*
272 * Finally call this to make the table ready for use. 284 * Finally call this to make the table ready for use.
273 */ 285 */
274int dm_table_complete(struct dm_table *t); 286int dm_table_complete(struct dm_table *t);