On Mon, Jan 18, 2021 at 11:37:18AM -0800, Darrick J. Wong wrote: > Ah, I see, you're asking why don't I make xfs_inode_walk responsible for > deciding what to do about EAGAIN, instead of open-coding that in the > ->execute function. That would be a nice cleanup since the walk > function already has special casing for EFSCORRUPTED. > > If I read you correctly, the relevant part of xfs_inode_walk becomes: > > error = execute(batch[i]...); > xfs_irele(batch[i]); > if (error == -EAGAIN) { > if (args->flags & EOF_SYNC) > skipped++; > continue; > } > > and the relevant part of xfs_inode_free_eofblocks becomes: > > if (!xfs_ilock_nowait(ip, XFS_IOLOCK_EXCL)) > return -EAGAIN; > > I think that would work, and afaict it won't cause any serious problems > with the deferred inactivation series. Exactly!