From bf97b6734e027cc18abad420ab88f861f65d7816 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Mon, 27 Sep 2010 16:00:04 -0500 Subject: 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 Signed-off-by: Steven Whitehouse --- fs/gfs2/bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/gfs2/bmap.c') diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 04513e997df6..5476c066d4ee 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -1151,7 +1151,7 @@ static int do_grow(struct inode *inode, u64 size) goto do_grow_qunlock; } - error = gfs2_trans_begin(sdp, RES_DINODE + 1, 0); + error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT, 0); if (error) goto do_grow_release; -- cgit v1.2.3