diff --git a/0014-fix-threadcount-estimates-for-phase-6.patch b/0014-fix-threadcount-estimates-for-phase-6.patch new file mode 100644 index 0000000000000000000000000000000000000000..2592105af346a4db599ca5e9571392ac1734cd07 --- /dev/null +++ b/0014-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 99a32bc796..393d9eaa83 100644 +--- a/scrub/phase6.c ++++ b/scrub/phase6.c +@@ -743,7 +743,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; + } +-- +cgit 1.2.3-korg + diff --git a/xfsprogs.spec b/xfsprogs.spec index e65fd16ccae6d3346fc57f1284117c6154497b3d..f28d8abf4e49343b3220352f5c4a7432e2cd9876 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,6 +1,6 @@ Name: xfsprogs Version: 6.6.0 -Release: 14 +Release: 15 Summary: Administration and debugging tools for the XFS file system License: GPL-1.0-or-later AND LGPL-2.1-or-later URL: https://xfs.wiki.kernel.org @@ -32,6 +32,7 @@ Patch10: 0010-misc-fix-reversed-calloc-arguments.patch Patch11: 0011-mkfs-fix-the-issue-of-maxpct-set-to-0-not-taking-eff.patch Patch12: 0012-xfs_repair-don-t-leak-the-rootdir-inode-when-orphana.patch Patch13: 0013-xfs_repair-fix-stupid-argument-error-in-verify_inode.patch +Patch14: 0014-fix-threadcount-estimates-for-phase-6.patch %description xfsprogs are the userspace utilities that manage XFS filesystems. @@ -104,6 +105,9 @@ rm -rf %{buildroot}%{_datadir}/doc/xfsprogs/ %exclude %{_mandir}/man8/xfs_scrub* %changelog +* Fri Nov 14 2025 xuchenchen - 6.6.0-15 +- xfs_scrub: fix threadcount estimates for phase 6 + * Wed Nov 12 2025 liuh - 6.6.0-14 - xfs_repair: fix stupid argument error in verify_inode_chunk