提交 bc020561 编写于 作者: B Bob Peterson

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: NBob Peterson <rpeterso@redhat.com>
Reviewed-by: NAndreas Gruenbacher <agruenba@redhat.com>
上级 27a2660f
...@@ -2084,6 +2084,8 @@ static int do_grow(struct inode *inode, u64 size) ...@@ -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 + 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 ? (sdp->sd_args.ar_quota == GFS2_QUOTA_OFF ?
0 : RES_QUOTA), 0); 0 : RES_QUOTA), 0);
if (error) if (error)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册