Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270008
b: refs/heads/master
c: bd5437a
h: refs/heads/master
v: v3
  • Loading branch information
Bob Peterson authored and Steven Whitehouse committed Oct 21, 2011
1 parent aa56ed7 commit d016af9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f75bbfb4dda68c86eb33cde7e2b5c1343c6d5812
refs/heads/master: bd5437a7d4307a35f2c7cc19cad706ec0e5d61f0
26 changes: 23 additions & 3 deletions trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh,
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
struct buffer_head *bh = NULL;
__be64 *top, *bottom;
__be64 *top, *bottom, *t2;
u64 bn;
int error;
int mh_size = sizeof(struct gfs2_meta_header);
Expand Down Expand Up @@ -859,7 +859,27 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh,
if (error)
goto out;

if (height < ip->i_height - 1)
if (height < ip->i_height - 1) {
struct buffer_head *rabh;

for (t2 = top; t2 < bottom; t2++, first = 0) {
if (!*t2)
continue;

bn = be64_to_cpu(*t2);
rabh = gfs2_getbuf(ip->i_gl, bn, CREATE);
if (trylock_buffer(rabh)) {
if (buffer_uptodate(rabh)) {
unlock_buffer(rabh);
brelse(rabh);
continue;
}
rabh->b_end_io = end_buffer_read_sync;
submit_bh(READA | REQ_META, rabh);
continue;
}
brelse(rabh);
}
for (; top < bottom; top++, first = 0) {
if (!*top)
continue;
Expand All @@ -871,7 +891,7 @@ static int recursive_scan(struct gfs2_inode *ip, struct buffer_head *dibh,
if (error)
break;
}

}
out:
brelse(bh);
return error;
Expand Down

0 comments on commit d016af9

Please sign in to comment.