diff options
author | Mike Anderson <andmike@us.ibm.com> | 2006-03-27 01:17:54 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-27 08:44:59 -0800 |
commit | 1134e5ae79bab61c05657ca35a6297cf87202e35 (patch) | |
tree | 16d5e9c722fbe17dc343c65b85628c8e6ee36199 /drivers/md/dm.h | |
parent | 9ade92a9a5b0a3a10efa6551b8c67a9277bf0438 (diff) | |
download | linux-1134e5ae79bab61c05657ca35a6297cf87202e35.tar.gz linux-1134e5ae79bab61c05657ca35a6297cf87202e35.tar.bz2 linux-1134e5ae79bab61c05657ca35a6297cf87202e35.zip |
[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); * Functions for manipulating a table. Tables are also reference * counted. *---------------------------------------------------------------*/ -int dm_table_create(struct dm_table **result, int mode, unsigned num_targets); +int dm_table_create(struct dm_table **result, int mode, + unsigned num_targets, struct mapped_device *md); void dm_table_get(struct dm_table *t); 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); unsigned int dm_table_get_num_targets(struct dm_table *t); struct list_head *dm_table_get_devices(struct dm_table *t); int dm_table_get_mode(struct dm_table *t); +struct mapped_device *dm_table_get_md(struct dm_table *t); void dm_table_presuspend_targets(struct dm_table *t); void dm_table_postsuspend_targets(struct dm_table *t); void dm_table_resume_targets(struct dm_table *t); |