diff options
| author | Alexander Viro <viro@math.psu.edu> | 2002-07-20 20:47:53 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-07-20 20:47:53 -0700 |
| commit | 5844ac33e46839babf72edf7e8315b45cb95ebc6 (patch) | |
| tree | 91b38eeb23cbf72668f1b6270b19d83f0de140c6 /include/linux/blkdev.h | |
| parent | a22f8253014bf053a5253ad9388611c368a7e285 (diff) | |
[PATCH] block device size cleanups
for partitioned devices we use ->nr_sect to find the size; blk_size[] is
still used for things like floppy.c, etc.; that will go away later.
There was only one place (do_open()) that needed it - the rest uses
->bd_inode->i_size now. So blkdev_size_in_bytes() is gone - it's
expanded in its only caller. Same place (do_open()) finds the partition
offset and stores it in new field ->bd_offset. As the result, call of
get_gendisk() is gone from the IO path - in blk_partition_remap() we
just add ->bd_offset.
Additionally, we take driver probing (get_blkfops()) outside of ->bd_sem
(again, do_open()) - that will allow to kill ad-hackery in check_partitions()
(opening bdev by hand).
Diffstat (limited to 'include/linux/blkdev.h')
| -rw-r--r-- | include/linux/blkdev.h | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 297cb0ba10c1..7460a98bb0b3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -389,20 +389,6 @@ extern inline unsigned int block_size(struct block_device *bdev) return bdev->bd_block_size; } -static inline loff_t blkdev_size_in_bytes(kdev_t dev) -{ -#if 0 - if (blk_size_in_bytes[major(dev)]) - return blk_size_in_bytes[major(dev)][minor(dev)]; - else -#endif - if (blk_size[major(dev)]) - return (loff_t) blk_size[major(dev)][minor(dev)] - << BLOCK_SIZE_BITS; - else - return 0; -} - typedef struct {struct page *v;} Sector; unsigned char *read_dev_sector(struct block_device *, unsigned long, Sector *); |
