diff options
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 4eaf075da217..fd90bc8f9e45 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/device-mapper.h> | 14 | #include <linux/device-mapper.h> |
15 | #include <linux/list.h> | 15 | #include <linux/list.h> |
16 | #include <linux/blkdev.h> | 16 | #include <linux/blkdev.h> |
17 | #include <linux/hdreg.h> | ||
17 | 18 | ||
18 | #define DM_NAME "device-mapper" | 19 | #define DM_NAME "device-mapper" |
19 | #define DMWARN(f, x...) printk(KERN_WARNING DM_NAME ": " f "\n" , ## x) | 20 | #define DMWARN(f, x...) printk(KERN_WARNING DM_NAME ": " f "\n" , ## x) |
@@ -23,16 +24,6 @@ | |||
23 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ | 24 | #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ |
24 | 0 : scnprintf(result + sz, maxlen - sz, x)) | 25 | 0 : scnprintf(result + sz, maxlen - sz, x)) |
25 | 26 | ||
26 | /* | ||
27 | * FIXME: I think this should be with the definition of sector_t | ||
28 | * in types.h. | ||
29 | */ | ||
30 | #ifdef CONFIG_LBD | ||
31 | #define SECTOR_FORMAT "%llu" | ||
32 | #else | ||
33 | #define SECTOR_FORMAT "%lu" | ||
34 | #endif | ||
35 | |||
36 | #define SECTOR_SHIFT 9 | 27 | #define SECTOR_SHIFT 9 |
37 | 28 | ||
38 | /* | 29 | /* |
@@ -57,7 +48,7 @@ struct mapped_device; | |||
57 | int dm_create(struct mapped_device **md); | 48 | int dm_create(struct mapped_device **md); |
58 | int dm_create_with_minor(unsigned int minor, struct mapped_device **md); | 49 | int dm_create_with_minor(unsigned int minor, struct mapped_device **md); |
59 | void dm_set_mdptr(struct mapped_device *md, void *ptr); | 50 | void dm_set_mdptr(struct mapped_device *md, void *ptr); |
60 | void *dm_get_mdptr(dev_t dev); | 51 | void *dm_get_mdptr(struct mapped_device *md); |
61 | struct mapped_device *dm_get_md(dev_t dev); | 52 | struct mapped_device *dm_get_md(dev_t dev); |
62 | 53 | ||
63 | /* | 54 | /* |
@@ -95,11 +86,18 @@ int dm_wait_event(struct mapped_device *md, int event_nr); | |||
95 | struct gendisk *dm_disk(struct mapped_device *md); | 86 | struct gendisk *dm_disk(struct mapped_device *md); |
96 | int dm_suspended(struct mapped_device *md); | 87 | int dm_suspended(struct mapped_device *md); |
97 | 88 | ||
89 | /* | ||
90 | * Geometry functions. | ||
91 | */ | ||
92 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); | ||
93 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); | ||
94 | |||
98 | /*----------------------------------------------------------------- | 95 | /*----------------------------------------------------------------- |
99 | * Functions for manipulating a table. Tables are also reference | 96 | * Functions for manipulating a table. Tables are also reference |
100 | * counted. | 97 | * counted. |
101 | *---------------------------------------------------------------*/ | 98 | *---------------------------------------------------------------*/ |
102 | int dm_table_create(struct dm_table **result, int mode, unsigned num_targets); | 99 | int dm_table_create(struct dm_table **result, int mode, |
100 | unsigned num_targets, struct mapped_device *md); | ||
103 | 101 | ||
104 | void dm_table_get(struct dm_table *t); | 102 | void dm_table_get(struct dm_table *t); |
105 | void dm_table_put(struct dm_table *t); | 103 | void dm_table_put(struct dm_table *t); |
@@ -117,6 +115,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q); | |||
117 | unsigned int dm_table_get_num_targets(struct dm_table *t); | 115 | unsigned int dm_table_get_num_targets(struct dm_table *t); |
118 | struct list_head *dm_table_get_devices(struct dm_table *t); | 116 | struct list_head *dm_table_get_devices(struct dm_table *t); |
119 | int dm_table_get_mode(struct dm_table *t); | 117 | int dm_table_get_mode(struct dm_table *t); |
118 | struct mapped_device *dm_table_get_md(struct dm_table *t); | ||
120 | void dm_table_presuspend_targets(struct dm_table *t); | 119 | void dm_table_presuspend_targets(struct dm_table *t); |
121 | void dm_table_postsuspend_targets(struct dm_table *t); | 120 | void dm_table_postsuspend_targets(struct dm_table *t); |
122 | void dm_table_resume_targets(struct dm_table *t); | 121 | void dm_table_resume_targets(struct dm_table *t); |