diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2006-03-26 04:38:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:01 -0500 |
commit | 1d8fa7a2b9a39d18727acc5c468e870df606c852 (patch) | |
tree | 41537fe9ea5478f3243e3301184dc13980f8201f /include/linux/fs.h | |
parent | fa30bd058b746c0e2318a77ff8b4977faa924c2c (diff) |
[PATCH] remove ->get_blocks() support
Now that get_block() can handle mapping multiple disk blocks, no need to have
->get_blocks(). This patch removes fs specific ->get_blocks() added for DIO
and makes it users use get_block() instead.
Signed-off-by: Badari Pulavarty <pbadari@us.ibm.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.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 155d29d5e5e4..9d9674946956 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -252,9 +252,6 @@ extern void __init files_init(unsigned long); | |||
252 | struct buffer_head; | 252 | struct buffer_head; |
253 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, | 253 | typedef int (get_block_t)(struct inode *inode, sector_t iblock, |
254 | struct buffer_head *bh_result, int create); | 254 | struct buffer_head *bh_result, int create); |
255 | typedef int (get_blocks_t)(struct inode *inode, sector_t iblock, | ||
256 | unsigned long max_blocks, | ||
257 | struct buffer_head *bh_result, int create); | ||
258 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, | 255 | typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, |
259 | ssize_t bytes, void *private); | 256 | ssize_t bytes, void *private); |
260 | 257 | ||
@@ -1645,7 +1642,7 @@ static inline void do_generic_file_read(struct file * filp, loff_t *ppos, | |||
1645 | 1642 | ||
1646 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, | 1643 | ssize_t __blockdev_direct_IO(int rw, struct kiocb *iocb, struct inode *inode, |
1647 | struct block_device *bdev, const struct iovec *iov, loff_t offset, | 1644 | struct block_device *bdev, const struct iovec *iov, loff_t offset, |
1648 | unsigned long nr_segs, get_blocks_t get_blocks, dio_iodone_t end_io, | 1645 | unsigned long nr_segs, get_block_t get_block, dio_iodone_t end_io, |
1649 | int lock_type); | 1646 | int lock_type); |
1650 | 1647 | ||
1651 | enum { | 1648 | enum { |
@@ -1656,29 +1653,29 @@ enum { | |||
1656 | 1653 | ||
1657 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, | 1654 | static inline ssize_t blockdev_direct_IO(int rw, struct kiocb *iocb, |
1658 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1655 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1659 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1656 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1660 | dio_iodone_t end_io) | 1657 | dio_iodone_t end_io) |
1661 | { | 1658 | { |
1662 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1659 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1663 | nr_segs, get_blocks, end_io, DIO_LOCKING); | 1660 | nr_segs, get_block, end_io, DIO_LOCKING); |
1664 | } | 1661 | } |
1665 | 1662 | ||
1666 | static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, | 1663 | static inline ssize_t blockdev_direct_IO_no_locking(int rw, struct kiocb *iocb, |
1667 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1664 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1668 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1665 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1669 | dio_iodone_t end_io) | 1666 | dio_iodone_t end_io) |
1670 | { | 1667 | { |
1671 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1668 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1672 | nr_segs, get_blocks, end_io, DIO_NO_LOCKING); | 1669 | nr_segs, get_block, end_io, DIO_NO_LOCKING); |
1673 | } | 1670 | } |
1674 | 1671 | ||
1675 | static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, | 1672 | static inline ssize_t blockdev_direct_IO_own_locking(int rw, struct kiocb *iocb, |
1676 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, | 1673 | struct inode *inode, struct block_device *bdev, const struct iovec *iov, |
1677 | loff_t offset, unsigned long nr_segs, get_blocks_t get_blocks, | 1674 | loff_t offset, unsigned long nr_segs, get_block_t get_block, |
1678 | dio_iodone_t end_io) | 1675 | dio_iodone_t end_io) |
1679 | { | 1676 | { |
1680 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, | 1677 | return __blockdev_direct_IO(rw, iocb, inode, bdev, iov, offset, |
1681 | nr_segs, get_blocks, end_io, DIO_OWN_LOCKING); | 1678 | nr_segs, get_block, end_io, DIO_OWN_LOCKING); |
1682 | } | 1679 | } |
1683 | 1680 | ||
1684 | extern struct file_operations generic_ro_fops; | 1681 | extern struct file_operations generic_ro_fops; |