On Tue, May 10, 2022 at 05:52:08AM -0700, Christoph Hellwig wrote: > On Thu, May 05, 2022 at 09:04:54AM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > Check the superblock's free rt extent count against what we observed. > > This increases the runtime and memory usage, but we can now report > > undercounting frextents as a result of a logging bug in the kernel. > > Note that repair has always fixed the undercount, but it no longer does > > that silently. > > This looks sensible, but can't we still skip running phase5 for > file systems without an RT subvolume? Yeah, I was of half a mind to make a separate function phase5_nomodify instead of burying that in phase5_func()... ...but OTOH, I suppose the dinode inspection functions will flag errors if the superblock says sb_rextents == 0 but DIFLAG_REALTIME is set on a regular file. So, I guess that could be a separate check_rtmetadata() function that lives inside phase5.c and gets triggered in the (nomodify && sb_rblocks > 0) case. --D