On Wed, Dec 06, 2023 at 06:43:16PM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Christoph asked for stronger protections against online repair zapping a > fork to get the inode to load vs. other threads trying to access the > partially repaired file. Do this by adding a special "[DA]FORK_ZAPPED" > inode health flag whenever repair zaps a fork, and sprinkling checks for > that flag into the various file operations for things that don't like > handling an unexpected zero-extents fork. > > In practice xfs_scrub will scrub and fix the forks almost immediately > after zapping them, so the window is very small. This probably should be before the previous two patches, and the reordering seems easy enough. We should also have a blurb in the commit log and code that this flag right now is in-memory only and thus the zapped forks can leak through an unmount or crash. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>