]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix a out-of-bound access of raid_map
authorZhao Lei <zhaolei@cn.fujitsu.com>
Tue, 20 Jan 2015 07:11:31 +0000 (15:11 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Jan 2015 02:06:47 +0000 (18:06 -0800)
commitb65637d54ba8ce0cca513713e138d253608999ef
treed08a3f23ae3609cba9fca83b22943c7a04032349
parent654be915980798c44c36e497fcde42b428dfd454
Btrfs: fix a out-of-bound access of raid_map

We add the number of stripes on target devices into bbio->num_stripes
if we are under device replacement, and we just sort the raid_map of
those stripes that not on the target devices, so if when we need
real raid_map, we need skip the stripes on the target devices.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/scrub.c