diff options
author | Mike Anderson <andmike@us.ibm.com> | 2006-03-27 04:17:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 11:44:59 -0500 |
commit | 1134e5ae79bab61c05657ca35a6297cf87202e35 (patch) | |
tree | 16d5e9c722fbe17dc343c65b85628c8e6ee36199 /drivers/md/dm.h | |
parent | 9ade92a9a5b0a3a10efa6551b8c67a9277bf0438 (diff) |
[PATCH] dm table: store md
Store an up-pointer to the owning struct mapped_device in every table when it
is created.
Access it with:
struct mapped_device *dm_table_get_md(struct dm_table *t)
Tables linked to md must be destroyed before the md itself.
Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r-- | drivers/md/dm.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 17ffa8d671a7..79e800051a10 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h | |||
@@ -89,7 +89,8 @@ int dm_suspended(struct mapped_device *md); | |||
89 | * Functions for manipulating a table. Tables are also reference | 89 | * Functions for manipulating a table. Tables are also reference |
90 | * counted. | 90 | * counted. |
91 | *---------------------------------------------------------------*/ | 91 | *---------------------------------------------------------------*/ |
92 | int dm_table_create(struct dm_table **result, int mode, unsigned num_targets); | 92 | int dm_table_create(struct dm_table **result, int mode, |
93 | unsigned num_targets, struct mapped_device *md); | ||
93 | 94 | ||
94 | void dm_table_get(struct dm_table *t); | 95 | void dm_table_get(struct dm_table *t); |
95 | void dm_table_put(struct dm_table *t); | 96 | void dm_table_put(struct dm_table *t); |
@@ -107,6 +108,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q); | |||
107 | unsigned int dm_table_get_num_targets(struct dm_table *t); | 108 | unsigned int dm_table_get_num_targets(struct dm_table *t); |
108 | struct list_head *dm_table_get_devices(struct dm_table *t); | 109 | struct list_head *dm_table_get_devices(struct dm_table *t); |
109 | int dm_table_get_mode(struct dm_table *t); | 110 | int dm_table_get_mode(struct dm_table *t); |
111 | struct mapped_device *dm_table_get_md(struct dm_table *t); | ||
110 | void dm_table_presuspend_targets(struct dm_table *t); | 112 | void dm_table_presuspend_targets(struct dm_table *t); |
111 | void dm_table_postsuspend_targets(struct dm_table *t); | 113 | void dm_table_postsuspend_targets(struct dm_table *t); |
112 | void dm_table_resume_targets(struct dm_table *t); | 114 | void dm_table_resume_targets(struct dm_table *t); |