aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorMike Anderson <andmike@us.ibm.com>2006-03-27 04:17:54 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:44:59 -0500
commit1134e5ae79bab61c05657ca35a6297cf87202e35 (patch)
tree16d5e9c722fbe17dc343c65b85628c8e6ee36199 /drivers/md/dm.h
parent9ade92a9a5b0a3a10efa6551b8c67a9277bf0438 (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.h4
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 *---------------------------------------------------------------*/
92int dm_table_create(struct dm_table **result, int mode, unsigned num_targets); 92int dm_table_create(struct dm_table **result, int mode,
93 unsigned num_targets, struct mapped_device *md);
93 94
94void dm_table_get(struct dm_table *t); 95void dm_table_get(struct dm_table *t);
95void dm_table_put(struct dm_table *t); 96void dm_table_put(struct dm_table *t);
@@ -107,6 +108,7 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q);
107unsigned int dm_table_get_num_targets(struct dm_table *t); 108unsigned int dm_table_get_num_targets(struct dm_table *t);
108struct list_head *dm_table_get_devices(struct dm_table *t); 109struct list_head *dm_table_get_devices(struct dm_table *t);
109int dm_table_get_mode(struct dm_table *t); 110int dm_table_get_mode(struct dm_table *t);
111struct mapped_device *dm_table_get_md(struct dm_table *t);
110void dm_table_presuspend_targets(struct dm_table *t); 112void dm_table_presuspend_targets(struct dm_table *t);
111void dm_table_postsuspend_targets(struct dm_table *t); 113void dm_table_postsuspend_targets(struct dm_table *t);
112void dm_table_resume_targets(struct dm_table *t); 114void dm_table_resume_targets(struct dm_table *t);