Re: [PATCH v2 4/7] btrfs: introduce new read-repair infrastructure

Christoph Hellwig
2022-05-26T07:30:29Z

On Thu, May 26, 2022 at 11:06:31AM +0800, Qu Wenruo wrote:
> Hi Christoph, I'm pretty sure the non-continuous bio problem is here for
> all of our attempts to rework read-repair.

Why is it a problem? Multiple discontiguous errors in the same bio
are a very unusual error pattern. We need to handle it obviously, but
it doesn't need to be optimized as it is so rare. The most common error
pattern is that the entire read will return an error, followed by a single
corrupted sector.

> I'm wondering if there is some "dummy" page provided from block layer that
> we can utilize?

For reads nvme (and a few SCSI HBAs) support a bit bucket SGL for reads
that discard parts of the data. Right now upstream none of this is
supported, altough Keith has been looking into it (for a rather different
use case) in nvme. This does not help with writes, never mind the fact
that I would not want to use exotic and barely tested code and hardware
features for a non time critical and rarely used error handling path..