xfs: implement live updates for directory repairs
authorDarrick J. Wong <djwong@kernel.org>
Mon, 22 Apr 2024 16:48:10 +0000 (09:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 23 Apr 2024 23:55:13 +0000 (16:55 -0700)
commit8559b21a64d983315bdf1bd9f8dfdf732c56d057
treedccc9108a60880a9b140e65848e7f2b1421ca56c
parent76fc23b695f4717bb5e7b616eaad7d6213fdea9f
xfs: implement live updates for directory repairs

While we're scanning the filesystem for parent pointers that we can turn
into dirents, we cannot hold the IOLOCK or ILOCK of the directory being
repaired.  Therefore, we need to set up a dirent hook so that we can
keep the temporary directory up to date with the rest of the filesystem.
Hence we add the ability to *remove* entries from the temporary dir.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/dir_repair.c
fs/xfs/scrub/findparent.c
fs/xfs/scrub/findparent.h
fs/xfs/scrub/trace.h