On Fri, May 01, 2020 at 02:41:59PM -0500, Eric Blake wrote:
Oh cool, this sounds very similar to the existing extentlist plugin,
but with a difference that extentlist uses the input to decide which
portions of the file are advertised as sparse, while this one uses
which portions of the file cause EIO errors during read. Is it
worth trying to combine the two concepts into one filter, or do we
want to keep it orthogonal as two separate filters? Can we teach
both filters to reuse common code for parsing extent lists in
different formats (the extentlist format is the same format
documented by the nbdkit-sh-plugin .extents; yours is the ddrescue
format, I am also interested in the 'qemu-img map --output=json'
format)? In fact, if we introduce a common library for extent list
parsing, teaching nbdkit-sh-plugin to accept all formats might be
useful.
I think common code for parsing sounds useful (eventually), but the
filters are quite different in their effects so fully combining them
would be difficult and seems unlikely to achieve much. However ...
Or even make it configurable (via another .config knob) whether bad
blocks read as zero or cause EIO.
... this is definitely an interesting idea. I guess some clients will
stop at an EIO but would continue if the data read as zeroes (although
whether such clients would do the right thing is questionable).
Rich.
--
Richard Jones, Virtualization Group, Red Hat
http://people.redhat.com/~rjones
Read my programming and virtualization blog:
http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top