summaryrefslogtreecommitdiff
tag namefix-iunlink-6.6_2023-09-12 (498cfc290d07f225224f5229e9bf8ea4f01e1636)
tag date2023-09-12 10:34:49 -0700
tagged byDarrick J. Wong <djwong@kernel.org>
tagged objectcommit 68b957f64f...
xfs: reload the last iunlink item
It turns out that there are some serious bugs in how xfs handles the unlinked inode lists. Way back before 4.14, there was a bug where a ro mount of a dirty filesystem would recover the log bug neglect to purge the unlinked list. This leads to clean unmounted filesystems with unlinked inodes. Starting around 5.15, we also converted the codebase to maintain a doubly-linked incore unlinked list. However, we never provided the ability to load the incore list from disk. If someone tries to allocate an O_TMPFILE file on a clean fs with a pre-existing unlinked list or even deletes a file, the code will fail and the fs shuts down. This first part of the correction effort adds the ability to load the first inode in the bucket when unlinking a file; and to load the next inode in the list when inactivating (freeing) an inode. This has been lightly tested with fstests. Enjoy! Signed-off-by: Darrick J. Wong <djwong@kernel.org> -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQ2qTKExjcn+O1o2YRKO3ySh0YRpgUCZQChOQAKCRBKO3ySh0YR plJvAQC0s843w2nvluXlIE8P9nBqk2ht6zwNOJpiZbWnf0zeLAD/a6v0HVVLbGN5 qHVd/abQ5QIW55Ybm3Qko6PKvV4Nlgo= =WcRN -----END PGP SIGNATURE-----