Home Home > GIT Browse > openSUSE-15.1
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2019-08-15 09:57:52 +0300
committerNikolay Borisov <nborisov@suse.com>2019-08-15 09:58:01 +0300
commitdf62a3195e81d1d15223c2c1058c440f7db4cebc (patch)
tree581c38a85c781f2075b3c21b9658a4c8f242f5b2
parent2188182a0f0e616e39f37f2d67f855141b239a11 (diff)
xfs: truncate transaction does not modify the inobt
(bsc#1145235).
-rw-r--r--patches.suse/xfs-truncate-transaction-does-not-modify-the-inobt.patch49
-rw-r--r--series.conf1
2 files changed, 50 insertions, 0 deletions
diff --git a/patches.suse/xfs-truncate-transaction-does-not-modify-the-inobt.patch b/patches.suse/xfs-truncate-transaction-does-not-modify-the-inobt.patch
new file mode 100644
index 0000000000..5ddc43efa5
--- /dev/null
+++ b/patches.suse/xfs-truncate-transaction-does-not-modify-the-inobt.patch
@@ -0,0 +1,49 @@
+From: Brian Foster <bfoster@redhat.com>
+Date: Mon, 8 Jan 2018 10:41:37 -0800
+Subject: xfs: truncate transaction does not modify the inobt
+Git-commit: a606ebdb859e78beb757dfefa08001df366e2ef5
+Patch-mainline: v4.16-rc1
+References: bsc#1145235
+
+The truncate transaction does not ever modify the inode btree, but
+includes an associated log reservation. Update
+xfs_calc_itruncate_reservation() to remove the reservation
+associated with inobt updates.
+
+Signed-off-by: Brian Foster <bfoster@redhat.com>
+Reviewed-by: Dave Chinner <dchinner@redhat.com>
+Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Acked-by: Nikolay Borisov <nborisov@suse.com>
+---
+ fs/xfs/libxfs/xfs_trans_resv.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
+index 173b1bc13ffe..037a1295d289 100644
+--- a/fs/xfs/libxfs/xfs_trans_resv.c
++++ b/fs/xfs/libxfs/xfs_trans_resv.c
+@@ -232,8 +232,6 @@ xfs_calc_write_reservation(
+ * the super block to reflect the freed blocks: sector size
+ * worst case split in allocation btrees per extent assuming 4 extents:
+ * 4 exts * 2 trees * (2 * max depth - 1) * block size
+- * the inode btree: max depth * blocksize
+- * the allocation btrees: 2 trees * (max depth - 1) * block size
+ */
+ STATIC uint
+ xfs_calc_itruncate_reservation(
+@@ -245,12 +243,7 @@ xfs_calc_itruncate_reservation(
+ XFS_FSB_TO_B(mp, 1))),
+ (xfs_calc_buf_res(9, mp->m_sb.sb_sectsize) +
+ xfs_calc_buf_res(xfs_allocfree_log_count(mp, 4),
+- XFS_FSB_TO_B(mp, 1)) +
+- xfs_calc_buf_res(5, 0) +
+- xfs_calc_buf_res(xfs_allocfree_log_count(mp, 1),
+- XFS_FSB_TO_B(mp, 1)) +
+- xfs_calc_buf_res(2 + mp->m_ialloc_blks +
+- mp->m_in_maxlevels, 0)));
++ XFS_FSB_TO_B(mp, 1))));
+ }
+
+ /*
+
diff --git a/series.conf b/series.conf
index d3d28b05e1..521aa67aca 100644
--- a/series.conf
+++ b/series.conf
@@ -11982,6 +11982,7 @@
patches.suse/xfs-print-transaction-log-reservation-on-overrun.patch
patches.suse/xfs-include-inobt-buffers-in-ifree-tx-log-reservation.patch
patches.suse/xfs-fix-up-agi-unlinked-list-reservations.patch
+ patches.suse/xfs-truncate-transaction-does-not-modify-the-inobt.patch
patches.fixes/0004-iomap-report-collisions-between-directio-and-buffere.patch
patches.fixes/xfs-call-xfs_qm_dqattach-before-performing-reflink-o.patch
patches.fixes/xfs-preserve-i_rdev-when-recycling-a-reclaimable-inode.patch