diff options
| author | Alexander Viro <viro@math.psu.edu> | 2002-04-24 23:50:28 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@penguin.transmeta.com> | 2002-04-24 23:50:28 -0700 |
| commit | 79c2cfb85fd83474e12f95ad85624eb421f4b6ea (patch) | |
| tree | 8f7efa3eb8ed7f2da825ac08c60c3951f757a8ab /include/linux/fs.h | |
| parent | eec08e21be012356dc94b0266419696f53b8d5d8 (diff) | |
[PATCH] (9/15) big struct block_device * push (first series)
- this one is interesting and will play in the next series as well;
affected place is fs/block_dev.c::do_open(). We check if bdev is
a partition (same way it is done in generic_make_request()) and
if it is - open entire disk and put pointer to its bdev into a
new field bdev->bd_contains. Otherwise (non-partition) we
set bdev->bd_contains to bdev. Corresponding cleanup done in
blkdev_put() (and failure path in do_open()) - when the last opener
goes away we close bdev->bd_contains if bdev is a partition (i.e.
not equal to its ->bd_contains) and set it to NULL.
Immediate effect is that we can get from bdev of partition to
bdev of disk when submitting a bio, but it also opens a way
to handle partition-parsing in a sane way. That will be done
in the next series.
Diffstat (limited to 'include/linux/fs.h')
| -rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index a97a764dcc53..7a05fbe4b64c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -420,6 +420,7 @@ struct block_device { struct list_head bd_inodes; void * bd_holder; int bd_holders; + struct block_device * bd_contains; }; struct inode { |
