On Thu, Mar 28, 2024 at 03:27:36PM +1100, Dave Chinner wrote: > > percpu_counter_set(&mp->m_fdblocks, fsc->fdblocks); > > - percpu_counter_set(&mp->m_frextents, fsc->frextents); > > + percpu_counter_set(&mp->m_frextents, > > + fsc->frextents - fsc->frextents_delayed); > > mp->m_sb.sb_frextents = fsc->frextents; > > Why do we set mp->m_frextents differently to mp->m_fdblocks? > Surely if we have to care about delalloc blocks here, we have to > process both data device and rt device delalloc block accounting the > same way, right? Unfortunately there are different. For data device blocks we use the lazy sb counters and thus never updated the sb version for any file system new enough to support scrub. For RT extents lazy sb counters only appear half way down Darrick's giant stack and aren't even upstream yet. > > -Dave. > -- > Dave Chinner > david@xxxxxxxxxxxxx ---end quoted text---