diff options
author | Bob Peterson <[email protected]> | 2018-12-18 08:29:32 -0600 |
---|---|---|
committer | Bob Peterson <[email protected]> | 2018-12-18 10:49:02 -0600 |
commit | bc0205612bbd4dd4026d4ba6287f5643c37366ec (patch) | |
tree | c742bb099d4e61d8335d50482e17e460ed5aa139 | |
parent | 27a2660f1ef944724956d92e8a312b6da0936fae (diff) |
gfs2: take jdata unstuff into account in do_grow
Before this patch, function do_grow would not reserve enough journal
blocks in the transaction to unstuff jdata files while growing them.
This patch adds the logic to add one more block if the file to grow
is jdata.
Signed-off-by: Bob Peterson <[email protected]>
Reviewed-by: Andreas Gruenbacher <[email protected]>
-rw-r--r-- | fs/gfs2/bmap.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index 5292e10aaa80..02b2646d84b3 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c @@ -2084,6 +2084,8 @@ static int do_grow(struct inode *inode, u64 size) } error = gfs2_trans_begin(sdp, RES_DINODE + RES_STATFS + RES_RG_BIT + + (unstuff && + gfs2_is_jdata(ip) ? RES_JDATA : 0) + (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ? 0 : RES_QUOTA), 0); if (error) |