Merge tag 'scrub-iget-fixes-6.4_2023-04-12' of git://git.kernel.org/pub/scm/linux...
authorDave Chinner <david@fromorbit.com>
Thu, 13 Apr 2023 21:10:41 +0000 (07:10 +1000)
committerDave Chinner <dchinner@redhat.com>
Thu, 13 Apr 2023 21:10:41 +0000 (07:10 +1000)
commit1e7912349ebcc194aba463b2c8128ba809ee4b64
tree6d1702bd340430ff01fcb8fefc2635c4f4fca6d9
parenta44667226d32a168a0953f9382cd8503ec947d7d
parent1fc7a0597d237c17b6501f8c33b76d3eaaae9079
Merge tag 'scrub-iget-fixes-6.4_2023-04-12' of git://git./linux/kernel/git/djwong/xfs-linux into guilt/xfs-for-next

xfs: fix iget/irele usage in online fsck [v24.5]

This patchset fixes a handful of problems relating to how we get and
release incore inodes in the online scrub code.  The first patch fixes
how we handle DONTCACHE -- our reasons for setting (or clearing it)
depend entirely on the runtime environment at irele time.  Hence we can
refactor iget and irele to use our own wrappers that set that context
appropriately.

The second patch fixes a race between the iget call in the inode core
scrubber and other writer threads that are allocating or freeing inodes
in the same AG by changing the behavior of xchk_iget (and the inode core
scrub setup function) to return either an incore inode or the AGI buffer
so that we can be sure that the inode cannot disappear on us.

The final patch elides MMAPLOCK from scrub paths when possible.  It did
not fit anywhere else.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>