diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2010-09-27 23:00:04 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2010-09-28 10:44:24 +0200 |
commit | bf97b6734e027cc18abad420ab88f861f65d7816 (patch) | |
tree | 74892640ed482487f3bc630ad4fd20e62dec2c54 /fs/gfs2/quota.c | |
parent | GFS2: Fix journal check for spectator mounts (diff) | |
download | linux-bf97b6734e027cc18abad420ab88f861f65d7816.tar.xz linux-bf97b6734e027cc18abad420ab88f861f65d7816.zip |
GFS2: reserve more blocks for transactions
Some of the functions in GFS2 were not reserving space in the transaction for
the resource group header and the resource groups bitblocks that get added
when you do allocation. GFS2 now makes sure to reserve space for the
resource group header and either all the bitblocks in the resource group, or
one for each block that it may allocate, whichever is smaller using the new
gfs2_rg_blocks() inline function.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r-- | fs/gfs2/quota.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c index 9bc6dd9a5443..58a9b9998b42 100644 --- a/fs/gfs2/quota.c +++ b/fs/gfs2/quota.c @@ -815,7 +815,7 @@ static int do_sync(unsigned int num_qd, struct gfs2_quota_data **qda) goto out_alloc; if (nalloc) - blocks += al->al_rgd->rd_length + nalloc * ind_blocks + RES_STATFS; + blocks += gfs2_rg_blocks(al) + nalloc * ind_blocks + RES_STATFS; error = gfs2_trans_begin(sdp, blocks, 0); if (error) @@ -1586,6 +1586,7 @@ static int gfs2_set_dqblk(struct super_block *sb, int type, qid_t id, error = gfs2_inplace_reserve(ip); if (error) goto out_alloc; + blocks += gfs2_rg_blocks(al); } error = gfs2_trans_begin(sdp, blocks + RES_DINODE + 1, 0); |