mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
gfs2: take jdata unstuff into account in do_grow
[ Upstream commit bc0205612b
]
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 <rpeterso@redhat.com>
Reviewed-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
1ed7c9f45f
commit
26804e37f5
1 changed files with 2 additions and 0 deletions
|
@ -1236,6 +1236,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)
|
||||
|
|
Loading…
Reference in a new issue