On Mon, Dec 04, 2023 at 12:43:51PM -0800, Darrick J. Wong wrote: > Moving things around in the directory tree might be worse, since we'd > now have to read the parent pointer(s) from the file to remove those > directory connections and add the new ones to lost+found. True. > I /think/ scouring around in a zapped data fork for a directory access > will return EFSCORRUPTED anyway, though that might occur at a late > enough stage in the process that the fs goes down, which isn't > desirable. > > However, once xrep_inode massages the ondisk inode into good enough > shape that iget starts working again, I could set XFS_SICK_INO_BMBTD (and > XFS_SICK_INO_DIR as appropriate) after zapping the data fork so that the > directory accesses would return EFSCORRUPTED instead of scouring around > in the zapped fork. > > Once we start persisting the sick flags, the prevention will last until > scrub or someone came along to fix the inode, instead of being a purely > incore flag. But, babysteps for now. I'll fix this patch to set the > XFS_SICK_INO_* flags after zapping things, and the predicates to pick > them up. Sounds good.