]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: skip checksum when reading compressed data if some IO have failed
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 20 Sep 2017 23:50:19 +0000 (17:50 -0600)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Sep 2017 12:53:26 +0000 (14:53 +0200)
commit08c3b5bf5b8a0a87677bdf42a41a2fd8d80085c8
treefdd78165cfdd0d426f7c0b86b28e910716d88821
parentacb5883912f8082c0f8644f6c1e65dae88a5b26d
Btrfs: skip checksum when reading compressed data if some IO have failed

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>
Tested-by: Paul Jones <paul@pauljones.id.au>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c