diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2006-03-26 04:38:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:01 -0500 |
commit | fa30bd058b746c0e2318a77ff8b4977faa924c2c (patch) | |
tree | a91abdcc4909da5dd16ed1bab91b5764eafed174 /fs/jfs | |
parent | b0cf2321c6599138f860517745503691556d8453 (diff) |
[PATCH] map multiple blocks for mpage_readpages()
This patch changes mpage_readpages() and get_block() to get the disk mapping
information for multiple blocks at the same time.
b_size represents the amount of disk mapping that needs to mapped. On the
successful get_block() b_size indicates the amount of disk mapping thats
actually mapped. Only the filesystems who care to use this information and
provide multiple disk blocks at a time can choose to do so.
No changes are needed for the filesystems who wants to ignore this.
[akpm@osdl.org: cleanups]
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/jfs')
-rw-r--r-- | fs/jfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 51a5fed90cca..7239ef339489 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -258,7 +258,8 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks, | |||
258 | static int jfs_get_block(struct inode *ip, sector_t lblock, | 258 | static int jfs_get_block(struct inode *ip, sector_t lblock, |
259 | struct buffer_head *bh_result, int create) | 259 | struct buffer_head *bh_result, int create) |
260 | { | 260 | { |
261 | return jfs_get_blocks(ip, lblock, 1, bh_result, create); | 261 | return jfs_get_blocks(ip, lblock, bh_result->b_size >> ip->i_blkbits, |
262 | bh_result, create); | ||
262 | } | 263 | } |
263 | 264 | ||
264 | static int jfs_writepage(struct page *page, struct writeback_control *wbc) | 265 | static int jfs_writepage(struct page *page, struct writeback_control *wbc) |