summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/dir_repair.c
AgeCommit message (Collapse)Author
2021-03-25xfs: scrub metadata directoriesDarrick J. Wong
Teach online scrub about the metadata directory tree. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2021-03-25xfs: move orphan files to the orphanagerepair-dirs_2021-03-25Darrick J. Wong
If we can't find a parent for a file, move it to the orphanage. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2021-03-25xfs: online repair of parent pointersDarrick J. Wong
Teach the online repair code to fix directory '..' entries (aka directory parent pointers). Since this requires us to know how to scan every dirent in every directory on the filesystem, we can reuse the parent scanner components to validate (or find!) the correct parent entry when rebuilding directories too. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
2021-03-25xfs: online repair of directoriesDarrick J. Wong
If a directory looks like it's in bad shape, try to sift through the rubble to find whatever directory entries we can, scan the directory tree for the parent (if needed), stage the new directory contents in a temporary file and use the atomic extent swapping mechanism to commit the results in bulk. As a side effect of this patch, directory inactivation will be able to purge any leftover dir blocks. Signed-off-by: Darrick J. Wong <djwong@kernel.org>