diff options
author | Badari Pulavarty <pbadari@us.ibm.com> | 2006-03-26 04:38:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-26 11:57:01 -0500 |
commit | b0cf2321c6599138f860517745503691556d8453 (patch) | |
tree | 39ecfea09c13ce09172ab3ec5a5b6d2fef657cac /fs/mpage.c | |
parent | 205f87f6b342444f722e4559d33318686f7df2ca (diff) |
[PATCH] pass b_size to ->get_block()
Pass amount of disk needs to be mapped to get_block(). This way one can
modify the fs ->get_block() functions to map multiple blocks at the same time.
[akpm@osdl.org: performance tweak]
[akpm@osdl.org: remove unneeded assignments]
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 'fs/mpage.c')
-rw-r--r-- | fs/mpage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/mpage.c b/fs/mpage.c index e431cb3878d6..7903b740cc11 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -192,6 +192,7 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages, | |||
192 | page_block++, block_in_file++) { | 192 | page_block++, block_in_file++) { |
193 | bh.b_state = 0; | 193 | bh.b_state = 0; |
194 | if (block_in_file < last_block) { | 194 | if (block_in_file < last_block) { |
195 | bh.b_size = blocksize; | ||
195 | if (get_block(inode, block_in_file, &bh, 0)) | 196 | if (get_block(inode, block_in_file, &bh, 0)) |
196 | goto confused; | 197 | goto confused; |
197 | } | 198 | } |
@@ -472,6 +473,7 @@ __mpage_writepage(struct bio *bio, struct page *page, get_block_t get_block, | |||
472 | for (page_block = 0; page_block < blocks_per_page; ) { | 473 | for (page_block = 0; page_block < blocks_per_page; ) { |
473 | 474 | ||
474 | map_bh.b_state = 0; | 475 | map_bh.b_state = 0; |
476 | map_bh.b_size = 1 << blkbits; | ||
475 | if (get_block(inode, block_in_file, &map_bh, 1)) | 477 | if (get_block(inode, block_in_file, &map_bh, 1)) |
476 | goto confused; | 478 | goto confused; |
477 | if (buffer_new(&map_bh)) | 479 | if (buffer_new(&map_bh)) |