]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: prepare phase3 for per-inogrp worker threads
authorDarrick J. Wong <djwong@kernel.org>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 18 May 2022 02:48:13 +0000 (22:48 -0400)
commit8f0c270f7f8534c8c48066b2aa51ebef20110f4a
treeed4e1b0c59654de8e6aca62be586cdfde29bdc62
parent0e5dce33d7a1c9d4e5d90126cc4cb217253cae8d
xfs_scrub: prepare phase3 for per-inogrp worker threads

In the next patch, we're going to rewrite scrub_scan_all_inodes to
schedule per-inogrp workqueue items that will run the iterator function.
In other words, the worker threads in phase 3 wil soon cease to be
per-AG threads.

To prepare for this, we must modify phase 3 so that any writes to shared
state are protected by the appropriate per-AG locks.  As far as I can
tell, the only updates to shared state are the per-AG action lists, so
create some per-AG locks for phase 3 and create locked wrappers for the
action_list_* functions if we find things to repair.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/phase3.c