!40 libxfs: fix inode reservation space for removing transaction
From: @hexiaole1994 Reviewed-by: @liuzhiqiang26 Signed-off-by: @liuzhiqiang26
This commit is contained in:
commit
2448701300
@ -0,0 +1,48 @@
|
|||||||
|
From 0af83349e54583a41f157edebb0055e14c029355 Mon Sep 17 00:00:00 2001
|
||||||
|
From: hexiaole <hexiaole@kylinos.cn>
|
||||||
|
Date: Tue, 2 Aug 2022 11:08:47 +0800
|
||||||
|
Subject: [PATCH] libxfs: fix inode reservation space for removing transaction
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Signed-off-by: hexiaole <hexiaole@kylinos.cn>
|
||||||
|
---
|
||||||
|
libxfs/xfs_trans_resv.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/libxfs/xfs_trans_resv.c b/libxfs/xfs_trans_resv.c
|
||||||
|
index 9ce7d8f..7638ef9 100644
|
||||||
|
--- a/libxfs/xfs_trans_resv.c
|
||||||
|
+++ b/libxfs/xfs_trans_resv.c
|
||||||
|
@@ -422,7 +422,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) +
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -1,6 +1,6 @@
|
|||||||
Name: xfsprogs
|
Name: xfsprogs
|
||||||
Version: 5.14.1
|
Version: 5.14.1
|
||||||
Release: 3
|
Release: 4
|
||||||
Summary: Administration and debugging tools for the XFS file system
|
Summary: Administration and debugging tools for the XFS file system
|
||||||
License: GPL+ and LGPLv2+
|
License: GPL+ and LGPLv2+
|
||||||
URL: https://xfs.wiki.kernel.org
|
URL: https://xfs.wiki.kernel.org
|
||||||
@ -19,6 +19,7 @@ Conflicts: xfsdump < 3.0.1
|
|||||||
|
|
||||||
Patch0: xfsprogs-5.12.0-default-bigtime-inobtcnt-on.patch
|
Patch0: xfsprogs-5.12.0-default-bigtime-inobtcnt-on.patch
|
||||||
Patch1: 0001-xfs-correct-nlink-printf-specifier-from-hd-to-PRIu32.patch
|
Patch1: 0001-xfs-correct-nlink-printf-specifier-from-hd-to-PRIu32.patch
|
||||||
|
Patch2: 0002-libxfs-fix-inode-reservation-space-for-removing-tran.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
xfsprogs are the userspace utilities that manage XFS filesystems.
|
xfsprogs are the userspace utilities that manage XFS filesystems.
|
||||||
@ -102,6 +103,9 @@ rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 18 2022 Xiaole He <hexiaole@kylinos.cn> - 5.14.1-4
|
||||||
|
- add Patch2: fix inode reservation space for removing transaction
|
||||||
|
|
||||||
* Mon Jul 18 2022 Xiaole He <hexiaole@kylinos.cn> - 5.14.1-3
|
* Mon Jul 18 2022 Xiaole He <hexiaole@kylinos.cn> - 5.14.1-3
|
||||||
- add Patch1: correct nlink printf specifier from hd to PRIu32
|
- add Patch1: correct nlink printf specifier from hd to PRIu32
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user