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.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h
index a90222e3297d..08d783592b73 100644
--- a/include/linux/device-mapper.h
+++ b/include/linux/device-mapper.h
@@ -13,7 +13,6 @@
13 13
14struct dm_target; 14struct dm_target;
15struct dm_table; 15struct dm_table;
16struct dm_dev;
17struct mapped_device; 16struct mapped_device;
18struct bio_vec; 17struct bio_vec;
19 18
@@ -84,6 +83,12 @@ void dm_error(const char *message);
84 */ 83 */
85void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev); 84void dm_set_device_limits(struct dm_target *ti, struct block_device *bdev);
86 85
86struct dm_dev {
87 struct block_device *bdev;
88 int mode;
89 char name[16];
90};
91
87/* 92/*
88 * Constructors should call these functions to ensure destination devices 93 * Constructors should call these functions to ensure destination devices
89 * are opened/closed correctly. 94 * are opened/closed correctly.
@@ -202,6 +207,7 @@ int dm_copy_name_and_uuid(struct mapped_device *md, char *name, char *uuid);
202struct gendisk *dm_disk(struct mapped_device *md); 207struct gendisk *dm_disk(struct mapped_device *md);
203int dm_suspended(struct mapped_device *md); 208int dm_suspended(struct mapped_device *md);
204int dm_noflush_suspending(struct dm_target *ti); 209int dm_noflush_suspending(struct dm_target *ti);
210union map_info *dm_get_mapinfo(struct bio *bio);
205 211
206/* 212/*
207 * Geometry functions. 213 * Geometry functions.
@@ -232,6 +238,11 @@ int dm_table_add_target(struct dm_table *t, const char *type,
232int dm_table_complete(struct dm_table *t); 238int dm_table_complete(struct dm_table *t);
233 239
234/* 240/*
241 * Unplug all devices in a table.
242 */
243void dm_table_unplug_all(struct dm_table *t);
244
245/*
235 * Table reference counting. 246 * Table reference counting.
236 */ 247 */
237struct dm_table *dm_get_table(struct mapped_device *md); 248struct dm_table *dm_get_table(struct mapped_device *md);
@@ -256,6 +267,11 @@ void dm_table_event(struct dm_table *t);
256 */ 267 */
257int dm_swap_table(struct mapped_device *md, struct dm_table *t); 268int dm_swap_table(struct mapped_device *md, struct dm_table *t);
258 269
270/*
271 * A wrapper around vmalloc.
272 */
273void *dm_vcalloc(unsigned long nmemb, unsigned long elem_size);
274
259/*----------------------------------------------------------------- 275/*-----------------------------------------------------------------
260 * Macros. 276 * Macros.
261 *---------------------------------------------------------------*/ 277 *---------------------------------------------------------------*/