aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJun'ichi Nomura <j-nomura@ce.jp.nec.com>2006-03-27 04:17:57 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-27 11:45:00 -0500
commit641dc636b0475582e48584340b774bd1e90d40d9 (patch)
tree75c839cebd81a8ec4fae6c0cc35a387da160cfbe /include
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')
-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 {
410 struct list_head bd_inodes; 410 struct list_head bd_inodes;
411 void * bd_holder; 411 void * bd_holder;
412 int bd_holders; 412 int bd_holders;
413#ifdef CONFIG_SYSFS
414 struct list_head bd_holder_list;
415#endif
413 struct block_device * bd_contains; 416 struct block_device * bd_contains;
414 unsigned bd_block_size; 417 unsigned bd_block_size;
415 struct hd_struct * bd_part; 418 struct hd_struct * bd_part;
@@ -1399,6 +1402,13 @@ extern int blkdev_get(struct block_device *, mode_t, unsigned);
1399extern int blkdev_put(struct block_device *); 1402extern int blkdev_put(struct block_device *);
1400extern int bd_claim(struct block_device *, void *); 1403extern int bd_claim(struct block_device *, void *);
1401extern void bd_release(struct block_device *); 1404extern void bd_release(struct block_device *);
1405#ifdef CONFIG_SYSFS
1406extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *);
1407extern void bd_release_from_disk(struct block_device *, struct gendisk *);
1408#else
1409#define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder)
1410#define bd_release_from_disk(bdev, disk) bd_release(bdev)
1411#endif
1402 1412
1403/* fs/char_dev.c */ 1413/* fs/char_dev.c */
1404extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *); 1414extern int alloc_chrdev_region(dev_t *, unsigned, unsigned, const char *);