aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-10-13 17:25:45 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-20 09:13:40 -0400
commit23591256d61354e20f12e98d7a496ad5c23de74c (patch)
tree3013a6e873a6e0a1d55fbace2fba638a978108c0 /fs/gfs2/recovery.c
parent42fb00838a644d03f9a2a5fbbe0b668a5ff5df4d (diff)
[GFS2] Fix bmap to map extents properly
This fix means that bmap will map extents of the length requested by the VFS rather than guessing at it, or just mapping one block at a time. The other callers of gfs2_block_map are audited to ensure they send the correct max extent lengths (i.e. set bh->b_size correctly). Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index 0a8a4b87dcc6..62cd223819b7 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -372,11 +372,12 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
372 u32 hash; 372 u32 hash;
373 struct buffer_head *bh; 373 struct buffer_head *bh;
374 int error; 374 int error;
375 struct buffer_head bh_map; 375 struct buffer_head bh_map = { .b_state = 0, .b_blocknr = 0 };
376 376
377 lblock = head->lh_blkno; 377 lblock = head->lh_blkno;
378 gfs2_replay_incr_blk(sdp, &lblock); 378 gfs2_replay_incr_blk(sdp, &lblock);
379 error = gfs2_block_map(&ip->i_inode, lblock, 0, &bh_map, 1); 379 bh_map.b_size = 1 << ip->i_inode.i_blkbits;
380 error = gfs2_block_map(&ip->i_inode, lblock, 0, &bh_map);
380 if (error) 381 if (error)
381 return error; 382 return error;
382 if (!bh_map.b_blocknr) { 383 if (!bh_map.b_blocknr) {