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.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index 2970022faa63..4427e0454051 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -191,6 +191,18 @@ struct dm_target {
191 191
192 /* Used to provide an error string from the ctr */ 192 /* Used to provide an error string from the ctr */
193 char *error; 193 char *error;
194
195 /*
196 * Set if this target needs to receive discards regardless of
197 * whether or not its underlying devices have support.
198 */
199 unsigned discards_supported:1;
200};
201
202/* Each target can link one of these into the table */
203struct dm_target_callbacks {
204 struct list_head list;
205 int (*congested_fn) (struct dm_target_callbacks *, int);
194}; 206};
195 207
196int dm_register_target(struct target_type *t); 208int dm_register_target(struct target_type *t);
@@ -269,14 +281,14 @@ int dm_table_add_target(struct dm_table *t, const char *type,
269 sector_t start, sector_t len, char *params); 281 sector_t start, sector_t len, char *params);
270 282
271/* 283/*
272 * Finally call this to make the table ready for use. 284 * Target_ctr should call this if it needs to add any callbacks.
273 */ 285 */
274int dm_table_complete(struct dm_table *t); 286void dm_table_add_target_callbacks(struct dm_table *t, struct dm_target_callbacks *cb);
275 287
276/* 288/*
277 * Unplug all devices in a table. 289 * Finally call this to make the table ready for use.
278 */ 290 */
279void dm_table_unplug_all(struct dm_table *t); 291int dm_table_complete(struct dm_table *t);
280 292
281/* 293/*
282 * Table reference counting. 294 * Table reference counting.