summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJun'ichi Nomura <j-nomura@ce.jp.nec.com>2006-03-27 01:17:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 08:45:00 -0800
commit641dc636b0475582e48584340b774bd1e90d40d9 (patch)
tree75c839cebd81a8ec4fae6c0cc35a387da160cfbe /include/linux/fs.h
parent100873687d81d4ce7b1299b447d33e87ba1e9583 (diff)
[PATCH] dm/md dependency tree in sysfs: bd_claim_by_kobject
Adding bd_claim_by_kobject() function which takes kobject as additional signature of holder device and creates sysfs symlinks between holder device and claimed device. bd_release_from_kobject() is a counterpart of bd_claim_by_kobject. Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> Cc: 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 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9d9674946956..680d913350e7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -410,6 +410,9 @@ struct block_device {
struct list_head bd_inodes;
void * bd_holder;
int bd_holders;
+#ifdef CONFIG_SYSFS
+ struct list_head bd_holder_list;
+#endif
struct block_device * bd_contains;
unsigned bd_block_size;
struct hd_struct * bd_part;
@@ -1399,6 +1402,13 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned);
extern int blkdev_put(struct block_device *);
extern int bd_claim(struct block_device *, void *);
extern void bd_release(struct block_device *);
+#ifdef CONFIG_SYSFS
+extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
+extern void bd_release_from_disk(struct block_device *, struct gendisk *);
+#else
+#define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder)
+#define bd_release_from_disk(bdev, disk) bd_release(bdev)
+#endif
/* fs/char_dev.c */
extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);