Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270003
b: refs/heads/master
c: 70b0c36
h: refs/heads/master
i:
  270001: e6b557d
  269999: b515ceb
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 21, 2011
1 parent b635d17 commit b78e0ab
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 12 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: d56fa8a1c17b68274349fc852f634af99c0c4671
refs/heads/master: 70b0c3656f12964a6dac104214c904c66e626058
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,15 +724,15 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
blen++;
else {
if (bstart)
gfs2_rlist_add(sdp, &rlist, bstart);
gfs2_rlist_add(ip, &rlist, bstart);

bstart = bn;
blen = 1;
}
}

if (bstart)
gfs2_rlist_add(sdp, &rlist, bstart);
gfs2_rlist_add(ip, &rlist, bstart);
else
goto out; /* Nothing to do */

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1821,7 +1821,7 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
if (blk != leaf_no)
brelse(bh);

gfs2_rlist_add(sdp, &rlist, blk);
gfs2_rlist_add(dip, &rlist, blk);
l_blocks++;
}

Expand Down
14 changes: 9 additions & 5 deletions trunk/fs/gfs2/rgrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1560,7 +1560,7 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)

/**
* gfs2_rlist_add - add a RG to a list of RGs
* @sdp: the filesystem
* @ip: the inode
* @rlist: the list of resource groups
* @block: the block
*
Expand All @@ -1570,9 +1570,10 @@ int gfs2_check_blk_type(struct gfs2_sbd *sdp, u64 no_addr, unsigned int type)
*
*/

void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
u64 block)
{
struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
struct gfs2_rgrpd *rgd;
struct gfs2_rgrpd **tmp;
unsigned int new_space;
Expand All @@ -1581,12 +1582,15 @@ void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
if (gfs2_assert_warn(sdp, !rlist->rl_ghs))
return;

rgd = gfs2_blk2rgrpd(sdp, block);
if (ip->i_rgd && rgrp_contains_block(ip->i_rgd, block))
rgd = ip->i_rgd;
else
rgd = gfs2_blk2rgrpd(sdp, block);
if (!rgd) {
if (gfs2_consist(sdp))
fs_err(sdp, "block = %llu\n", (unsigned long long)block);
fs_err(sdp, "rlist_add: no rgrp for block %llu\n", (unsigned long long)block);
return;
}
ip->i_rgd = rgd;

for (x = 0; x < rlist->rl_rgrps; x++)
if (rlist->rl_rgd[x] == rgd)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/rgrp.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ struct gfs2_rgrp_list {
struct gfs2_holder *rl_ghs;
};

extern void gfs2_rlist_add(struct gfs2_sbd *sdp, struct gfs2_rgrp_list *rlist,
extern void gfs2_rlist_add(struct gfs2_inode *ip, struct gfs2_rgrp_list *rlist,
u64 block);
extern void gfs2_rlist_alloc(struct gfs2_rgrp_list *rlist, unsigned int state);
extern void gfs2_rlist_free(struct gfs2_rgrp_list *rlist);
Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/gfs2/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1356,14 +1356,14 @@ static int ea_dealloc_indirect(struct gfs2_inode *ip)
blen++;
else {
if (bstart)
gfs2_rlist_add(sdp, &rlist, bstart);
gfs2_rlist_add(ip, &rlist, bstart);
bstart = bn;
blen = 1;
}
blks++;
}
if (bstart)
gfs2_rlist_add(sdp, &rlist, bstart);
gfs2_rlist_add(ip, &rlist, bstart);
else
goto out;

Expand Down

0 comments on commit b78e0ab

Please sign in to comment.