]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_scrub: move read verification scheduling to phase6.c
authorDarrick J. Wong <djwong@kernel.org>
Mon, 16 Mar 2026 20:31:32 +0000 (13:31 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 9 Apr 2026 22:30:18 +0000 (15:30 -0700)
commitacc91b2a53cdb119ad93f96eab46565733d5ec16
tree6c5da2de8eec338e15666359d5b34ee1b0cf184f
parent9ad485e7583224f3a6f5f6fccc5c9f402f22efba
xfs_scrub: move read verification scheduling to phase6.c

Right now there's a weird coupling between read_verify.c and spacemap.c:
Anyone using a read_verify_pool is required to tell the pool how many
threads it's going to use to call read_verify_schedule_io.  This is
because the read_verify_pool accumulates verification requests on a
per-thread basis to try to combine adjacent written regions for media
verification.  However, the verification requests are made from the
phase6.c callback (check_rmap) that is called from the workers created
by scrub_scan_all_spacemaps.

Yeah, that's confusing: implementation details of spacemap.c must be
inferred by phase6.c and passed to read_verify.c.

Let's fix this by moving the per-thread schedule accumulation to
phase6.c before the next patches constrain the number of IO threads
sending verification requests to the kernel.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/phase6.c
scrub/read_verify.c
scrub/read_verify.h
scrub/spacemap.h