On Wed, Feb 19, 2025 at 01:58:15PM -0800, Darrick J. Wong wrote: [pretty anoying full quote that takes a lot scrolling to get to the meat of the message..] > > + if (len > rmapip->i_used_blocks) { > > + xfs_err(mp, > > +"trying to free more blocks (%lld) than used counter (%u).", > > + len, rmapip->i_used_blocks); > > + ASSERT(len <= rmapip->i_used_blocks); > > + xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE); > > + return -EFSCORRUPTED; > > Nit: This should probably be marking the rtrmap inode corrupt any time > we decide to return EFSCORRUPTED, even if all we do is shut down the > filesystem: > > xfs_rtginode_mark_sick(rtg, XFS_RTGI_RMAP); > > The other place we need it is xfs_zoned_buffered_write_iomap_begin. Yes, that sounds reasonable.