summaryrefslogtreecommitdiff
path: root/fs/btrfs/tests
diff options
context:
space:
mode:
authorWang Shilong <wangsl.fnst@cn.fujitsu.com>2014-06-11 06:55:22 +0400
committerChris Mason <clm@fb.com>2014-06-13 20:52:21 +0400
commit5fbc7c59fd22c5a6531b40b0759624b680a95e52 (patch)
treedfd0fff7de04cc8250bfd1128bfac9f9ccff3601 /fs/btrfs/tests
parentcc68a8a5a4330a4bb72922d0c7a7044ae13ee692 (diff)
downloadlinux-5fbc7c59fd22c5a6531b40b0759624b680a95e52.tar.xz
Btrfs: fix unfinished readahead thread for raid5/6 degraded mounting
Steps to reproduce: # mkfs.btrfs -f /dev/sd[b-f] -m raid5 -d raid5 # mkfs.ext4 /dev/sdc --->corrupt one of btrfs device # mount /dev/sdb /mnt -o degraded # btrfs scrub start -BRd /mnt This is because readahead would skip missing device, this is not true for RAID5/6, because REQ_GET_READ_MIRRORS return 1 for RAID5/6 block mapping. If expected data locates in missing device, readahead thread would not call __readahead_hook() which makes event @rc->elems=0 wait forever. Fix this problem by checking return value of btrfs_map_block(),we can only skip missing device safely if there are several mirrors. Signed-off-by: Wang Shilong <wangsl.fnst@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/tests')
0 files changed, 0 insertions, 0 deletions