Re: [PATCH] btrfs: raid56: fix inverted bio-list check in scrub read assembly

From: David Sterba

Date: Wed Jul 22 2026 - 10:27:34 EST


On Fri, Jul 17, 2026 at 07:59:26AM +0930, Qu Wenruo wrote:
> > finish_parity_scrub() then compares the parity it computes from
> > the (cached, correct) data stripes against whatever happens to be in
> > the freshly allocated, uninitialized stripe pages:
> >
> > - if the garbage differs from the computed parity, the sector is
> > "repaired" and written back -- accidentally producing the correct
> > on-disk result;
> > - if a recycled page happens to still hold the old (correct) parity
> > content, the sector is deemed clean, dropped from dbitmap, and the
> > actually-corrupt on-disk parity is left in place -- silently, with
> > every scrub error counter reading zero.
>
> Unfortunately that's by design, as scrub never reports P/Q corruptions
> since there is no counter for them, and there is no space left for
> expansion either.

Right, unfortunately scrub was not designed with future extensions of
the stats. We can add v2 of the scrub progress ioctl as this does the
reporting part, and not the main scrub ioctl.