]> asedeno.scripts.mit.edu Git - linux.git/commit
Btrfs: enable repair during read for raid56 profile
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 29 Mar 2017 17:53:58 +0000 (10:53 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 18 Apr 2017 12:07:26 +0000 (14:07 +0200)
commitc725328c55443f150577efcf445a7924687342e4
treee1f88a7d401224779bab91b9c82ca9723a1b564f
parent619a974292387343c817f5a36e9df6daeb3ccc60
Btrfs: enable repair during read for raid56 profile

Now that scrub can fix data errors with the help of parity for raid56
profile, repair during read is able to as well.

Although the mirror num in raid56 scenario has different meanings, i.e.
0 or 1: read data directly
> 1:    do recover with parity,
it could be fit into how we repair bad block during read.

The trick is to use BTRFS_MAP_READ instead of BTRFS_MAP_WRITE to get the
device and position on it.

Cc: David Sterba <dsterba@suse.cz>
Tested-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c