From: Allison Henderson Date: Fri, 18 Nov 2022 09:48:26 +0000 (+0100) Subject: xfs: increase rename inode reservation X-Git-Tag: origin/for-next_2022-11-30~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=227bc97f12f2df902ab776fe038dc6d065f03c58;p=thirdparty%2Fxfsprogs-dev.git xfs: increase rename inode reservation Source kernel commit: e07ee6fe21f47cfd72ae566395c67a80e7c66163 xfs_rename can update up to 5 inodes: src_dp, target_dp, src_ip, target_ip and wip. So we need to increase the inode reservation to match. Signed-off-by: Allison Henderson Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c index 797176d7d..04c444806 100644 --- a/libxfs/xfs_trans_resv.c +++ b/libxfs/xfs_trans_resv.c @@ -421,7 +421,7 @@ xfs_calc_itruncate_reservation_minlogsize( /* * In renaming a files we can modify: - * the four inodes involved: 4 * inode size + * the five inodes involved: 5 * inode size * the two directory btrees: 2 * (max depth + v2) * dir block size * the two directory bmap btrees: 2 * max depth * block size * And the bmap_finish transaction can free dir and bmap blocks (two sets @@ -436,7 +436,7 @@ xfs_calc_rename_reservation( struct xfs_mount *mp) { return XFS_DQUOT_LOGRES(mp) + - max((xfs_calc_inode_res(mp, 4) + + max((xfs_calc_inode_res(mp, 5) + xfs_calc_buf_res(2 * XFS_DIROP_LOG_COUNT(mp), XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res(7, mp->m_sb.sb_sectsize) +