Re: [PATCH 2/2] Btrfs: skip checksum when reading compressed data if some IO have failed

David Sterba
2017-09-24T13:50:24Z

On Wed, Sep 20, 2017 at 05:50:19PM -0600, Liu Bo wrote:
> Currently even if the underlying disk reports failure on IO,
> compressed read endio still gets to verify checksum and reports it as
> a checksum error.
>
> In fact, if some IO have failed during reading a compressed data
> extent , there's no way the checksum could match, therefore, we can
> skip that in order to return error quickly to the upper layer.
>
> Please note that we need to do this after recording the failed mirror
> index so that read-repair in the upper layer's endio can work
> properly.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>

Reviewed-by: David Sterba <dsterba@suse.com>