aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorBadari Pulavarty <pbadari@us.ibm.com>2006-03-26 04:38:04 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:02 -0500
commitf91a2ad2ed97099fb565e3336f8df0df717f2ba9 (patch)
treeab8ebeca29bbbbf1f66c47173faebbc383a4dbf7 /fs/ext3
parentd6859bfca8cbfe4105704e410b0afa50beabbbb9 (diff)
[PATCH] ext3: multi-block get_block()
Mingming Cao recently added multi-block allocation support for ext3, currently used only by DIO. I added support to map multiple blocks for mpage_readpages(). This patch add support for ext3_get_block() to deal with multi-block mapping. Basically it renames ext3_direct_io_get_blocks() as ext3_get_block(). Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com> Cc: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/inode.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index e68587a7f366..48ae0339af17 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -941,9 +941,8 @@ out:
941 941
942#define DIO_CREDITS (EXT3_RESERVE_TRANS_BLOCKS + 32) 942#define DIO_CREDITS (EXT3_RESERVE_TRANS_BLOCKS + 32)
943 943
944static int 944static int ext3_get_block(struct inode *inode, sector_t iblock,
945ext3_direct_io_get_blocks(struct inode *inode, sector_t iblock, 945 struct buffer_head *bh_result, int create)
946 struct buffer_head *bh_result, int create)
947{ 946{
948 handle_t *handle = journal_current_handle(); 947 handle_t *handle = journal_current_handle();
949 int ret = 0; 948 int ret = 0;
@@ -992,12 +991,6 @@ get_block:
992 return ret; 991 return ret;
993} 992}
994 993
995static int ext3_get_block(struct inode *inode, sector_t iblock,
996 struct buffer_head *bh_result, int create)
997{
998 return ext3_direct_io_get_blocks(inode, iblock, bh_result, create);
999}
1000
1001/* 994/*
1002 * `handle' can be NULL if create is zero 995 * `handle' can be NULL if create is zero
1003 */ 996 */
@@ -1648,11 +1641,10 @@ static ssize_t ext3_direct_IO(int rw, struct kiocb *iocb,
1648 1641
1649 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov, 1642 ret = blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
1650 offset, nr_segs, 1643 offset, nr_segs,
1651 ext3_direct_io_get_blocks, NULL); 1644 ext3_get_block, NULL);
1652 1645
1653 /* 1646 /*
1654 * Reacquire the handle: ext3_direct_io_get_block() can restart the 1647 * Reacquire the handle: ext3_get_block() can restart the transaction
1655 * transaction
1656 */ 1648 */
1657 handle = journal_current_handle(); 1649 handle = journal_current_handle();
1658 1650