]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: skip checksum verification if IO error occurs
authorLiu Bo <bo.li.liu@oracle.com>
Fri, 14 Apr 2017 01:11:48 +0000 (18:11 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2017 16:26:03 +0000 (18:26 +0200)
commit38da56a94b8763e78e4659dd8dd84509ee5bed6d
tree7e6341f5838275051463269a12e6397fa7cd6aee
parent478ae897c1ef803a1d3a3546a2fd31cc84198a46
Btrfs: skip checksum verification if IO error occurs

Currently dio read also goes to verify checksum if -EIO has been returned,
although it usually fails on checksum, it's not necessary at all, we could
directly check if there is another copy to read.

And with this, the behavior of dio read is now consistent with that of
buffered read.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
[ use bool for uptodate ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c