libxfs: fix inode reservation space for removing transaction
PATCH v2 1/1 libxfs: fix inode reservation space for removing transaction
From: hexiaole <[email protected]>
In 'libxfs/xfs_trans_resv.c', the comment for transaction of removing a directory entry mentions that there has 2 inode size of space to be reserverd, but the actual code only count for 1 inode size:
/* libxfs/xfs_trans_resv.c begin */
/*
* For removing a directory entry we can modify:
* the parent directory inode: inode size
* the removed inode: inode size
...
xfs_calc_remove_reservation(
struct xfs_mount *mp)
{
return XFS_DQUOT_LOGRES(mp) +
xfs_calc_iunlink_add_reservation(mp) + max((xfs_calc_inode_res(mp, 1) +
...
/* libxfs/xfs_trans_resv.c end */
Here only count for 1 inode size to be reserved in 'xfs_calc_inode_res(mp, 1)', rather than 2.
---
V1 -> V2: djwong: remove redundant code citations
libxfs/xfs_trans_resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
libxfs/xfs_trans_resv.c +1 -1
@@ -514,7 +514,7 @@ xfs_calc_remove_reservation( {return XFS_DQUOT_LOGRES (mp) +xfs_calc_iunlink_add_reservation (mp) + - max((xfs_calc_inode_res(mp, 1) + + max((xfs_calc_inode_res(mp, 2) + xfs_calc_buf_res(XFS_DIROP_LOG_COUNT(mp), XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res(4, mp->m_sb.sb_sectsize) +
Signature · 1 line
2.27.0
Quoted 5 lines · Xiaole He
From: hexiaole <[email protected]>
In '
libxfs/xfs_trans_resv.c', the comment for transaction of removing a directory entry mentions that there has 2 inode size of space to be reserverd, but the actual code only count for 1 inode size:
Already merged, see 6.0-rc1.
--D
Quoted 42 lines
/*
libxfs/xfs_trans_resv.cbegin */
/*
* For removing a directory entry we can modify:
* the parent directory inode: inode size
* the removed inode: inode size
...
xfs_calc_remove_reservation(
structxfs_mount*mp)
{
returnXFS_DQUOT_LOGRES(mp)+
xfs_calc_iunlink_add_reservation(mp)+ max((xfs_calc_inode_res(mp, 1) +
...
/*libxfs/xfs_trans_resv.cend */Here only count for 1 inode size to be reserved in '
xfs_calc_inode_res(mp, 1)', rather than 2.Signed-off-by hexiaole <[email protected]>---
V1 -> V2: djwong: remove redundant code citationslibxfs/xfs_trans_resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libxfs/xfs_trans_resv.c +1
-1@@ -514,7 +514,7 @@ xfs_calc_remove_reservation( {return XFS_DQUOT_LOGRES (mp) +xfs_calc_iunlink_add_reservation (mp) + - max((xfs_calc_inode_res(mp, 1) + + max((xfs_calc_inode_res(mp, 2) + xfs_calc_buf_res(XFS_DIROP_LOG_COUNT(mp), XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res(4, mp->m_sb.sb_sectsize) +Signature · 1 line
2.27.0
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 5 lines · Xiaole He
Yes, Darrick, I already see the patch been merged into the kernel source 'xfs-linux', thanks, but not see it in the userspace utilities source 'xfsprogs-dev', so I resend this patch again for the userspace utilities source 'xfsprogs-dev'.
Quoted 7 lines
Is this action of resend neccesary? Sorry I do not know what is workflow of the 'libxfs' between the kernel source 'xfs-linux' and the userspace utilities souce 'xfsprogs-dev', is the patch of 'libxfs' will be merged into userspace utilities source 'xfsprogs-dev' automatically because it had been merged into the kernel source 'xfs-linux'? If so, I'm sorry for bother you and please ignore this mail.
Ah, sorry, I missed that. The xfsprogs maintainer automatically pulls kernel libxfs changes into xfsprogs before the (xfsprogs) 6.0.0-rc1 release. It isn't usually necessary to submit a straight port, unless you've tried porting it to userspace yourself and discovered that there are other non-trivial changes needed.
--D
Quoted 71 lines
Quoted 53 lines · Darrick J. Wong
Quoted 5 lines · Xiaole He
From: hexiaole <[email protected]>
In '
libxfs/xfs_trans_resv.c', the comment for transaction of removing a directory entry mentions that there has 2 inode size of space to be reserverd, but the actual code only count for 1 inode size:Already merged, see 6.0-rc1.
--D
Quoted 42 lines
/*
libxfs/xfs_trans_resv.cbegin */
/*
* For removing a directory entry we can modify:
* the parent directory inode: inode size
* the removed inode: inode size
...
xfs_calc_remove_reservation(
structxfs_mount*mp)
{
returnXFS_DQUOT_LOGRES(mp)+
xfs_calc_iunlink_add_reservation(mp)+ max((xfs_calc_inode_res(mp, 1) +
...
/*libxfs/xfs_trans_resv.cend */Here only count for 1 inode size to be reserved in '
xfs_calc_inode_res(mp, 1)', rather than 2.Signed-off-by hexiaole <[email protected]>---
V1 -> V2: djwong: remove redundant code citationslibxfs/xfs_trans_resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)libxfs/xfs_trans_resv.c +1
-1@@ -514,7 +514,7 @@ xfs_calc_remove_reservation( {return XFS_DQUOT_LOGRES (mp) +xfs_calc_iunlink_add_reservation (mp) + - max((xfs_calc_inode_res(mp, 1) + + max((xfs_calc_inode_res(mp, 2) + xfs_calc_buf_res(XFS_DIROP_LOG_COUNT(mp), XFS_FSB_TO_B(mp, 1))), (xfs_calc_buf_res(4, mp->m_sb.sb_sectsize) +Signature · 1 line
2.27.0