]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix kernel oops while reading compressed data
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 20 Sep 2017 23:50:18 +0000 (17:50 -0600)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Sep 2017 12:53:23 +0000 (14:53 +0200)
commitacb5883912f8082c0f8644f6c1e65dae88a5b26d
treea8e2a5e0fc58793ef9ce24ecd19834a3756c1e17
parentdf02bcfc1737481ffbbfe633659f247dca4c4dc9
Btrfs: fix kernel oops while reading compressed data

The kernel oops happens at

kernel BUG at fs/btrfs/extent_io.c:2104!
...
RIP: clean_io_failure+0x263/0x2a0 [btrfs]

It's showing that read-repair code is using an improper mirror index.
This is due to the fact that compression read's endio hasn't recorded
the failed mirror index in %cb->orig_bio.

With this, btrfs's read-repair can work properly on reading compressed
data.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reported-by: Paul Jones <paul@pauljones.id.au>
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