diff --git a/0015-fix-threadcount-estimates-for-phase-6.patch b/0015-fix-threadcount-estimates-for-phase-6.patch new file mode 100644 index 0000000000000000000000000000000000000000..54dcf88220f6b5b70b74eb1e799f5d1610a3be14 --- /dev/null +++ b/0015-fix-threadcount-estimates-for-phase-6.patch @@ -0,0 +1,42 @@ +From 13eedd45afb39354a9fe5089d86f4eff1a94ac79 Mon Sep 17 00:00:00 2001 +From: "Darrick J. Wong" +Date: Mon, 15 Apr 2024 16:07:46 -0700 +Subject: xfs_scrub: fix threadcount estimates for phase 6 + +If a filesystem has a realtime device or an external log device, the +media scan can start up a separate readverify controller (and workqueue) +to handle that. Each of those controllers can call progress_add, so we +need to bump up nr_threads so that the progress reports controller knows +to make its ptvar big enough to handle all these threads. + +Signed-off-by: Darrick J. Wong +Reviewed-by: Christoph Hellwig +--- + scrub/phase6.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/scrub/phase6.c b/scrub/phase6.c +index 8d97673..1991a05 100644 +--- a/scrub/phase6.c ++++ b/scrub/phase6.c +@@ -732,7 +732,17 @@ phase6_estimate( + + *items = cvt_off_fsb_to_b(&ctx->mnt, + (d_blocks - d_bfree) + (r_blocks - r_bfree)); ++ ++ /* ++ * Each read-verify pool starts a thread pool, and each worker thread ++ * can contribute to the progress counter. Hence we need to set ++ * nr_threads appropriately to handle that many threads. ++ */ + *nr_threads = disk_heads(ctx->datadev); ++ if (ctx->rtdev) ++ *nr_threads += disk_heads(ctx->rtdev); ++ if (ctx->logdev) ++ *nr_threads += disk_heads(ctx->logdev); + *rshift = 20; + return 0; + } +-- +2.33.0 + diff --git a/xfsprogs.spec b/xfsprogs.spec index 01f28302cd736ff8d1efbafb9074e492ae8cea07..b6dd95d0efd5e6d2576500c34412564f219d7d7a 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,6 +1,6 @@ Name: xfsprogs Version: 5.6.0 -Release: 7 +Release: 8 Summary: Administration and debugging tools for the XFS file system License: GPL+ and LGPLv2+ URL: https://xfs.wiki.kernel.org @@ -21,6 +21,7 @@ Patch11: 0011-xfs-set-xefi_discard-when-creating-a-deferred-agfl-f.patch Patch12: 0012-xfs-correct-nlink-printf-specifier-from-hd-to-PRIu32.patch Patch13: 0013-libxfs-fix-inode-reservation-space-for-removing-tran.patch Patch14: 0014-xfs_db-use-preferable-macro-to-seek-offset-for-local.patch +Patch15: 0015-fix-threadcount-estimates-for-phase-6.patch BuildRequires: libtool libattr-devel libuuid-devel gcc git gettext BuildRequires: readline-devel libblkid-devel >= 2.30 lvm2-devel libicu-devel >= 62.0 @@ -113,6 +114,9 @@ rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ %changelog +* Mon Nov 17 2025 xuchenchen - 5.6.0-8 +- xfs_scrub: fix threadcount estimates for phase 6 + * Thu Dec 8 2022 Xiaole He - 5.6.0-7 - add Patch14: use preferable macro to seek offset for local dir3 entry fields