mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[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. [[email protected]: cleanups] Signed-off-by: Badari Pulavarty <[email protected]> Cc: Mingming Cao <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
b0cf2321c6
commit
fa30bd058b
3 changed files with 90 additions and 22 deletions
|
|
@ -258,7 +258,8 @@ jfs_get_blocks(struct inode *ip, sector_t lblock, unsigned long max_blocks,
|
|||
static int jfs_get_block(struct inode *ip, sector_t lblock,
|
||||
struct buffer_head *bh_result, int create)
|
||||
{
|
||||
return jfs_get_blocks(ip, lblock, 1, bh_result, create);
|
||||
return jfs_get_blocks(ip, lblock, bh_result->b_size >> ip->i_blkbits,
|
||||
bh_result, create);
|
||||
}
|
||||
|
||||
static int jfs_writepage(struct page *page, struct writeback_control *wbc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue