summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-07-03 14:22:13 +0400
committerChris Mason <clm@fb.com>2014-09-18 00:37:27 +0400
commitd20983b40e828fdca920b3d678544c6a0967a446 (patch)
treebfcd3d752e12bb727701250fdf58cb5f3f0abebc /tools/perf/scripts/python
parent47059d930f0e002ff851beea87d738146804726d (diff)
downloadlinux-d20983b40e828fdca920b3d678544c6a0967a446.tar.xz
Btrfs: fix writing data into the seed filesystem
If we mounted a seed filesystem with degraded option, and then added a new device into the seed filesystem, then we found adding device failed because of the IO failure. Steps to reproduce: # mkfs.btrfs -d raid1 -m raid1 <dev0> <dev1> # btrfstune -S 1 <dev0> # mount <dev0> -o degraded <mnt> # btrfs device add -f <dev2> <mnt> It is because the original didn't set the chunk on the seed device to be read-only if the degraded flag was set. It was introduced by patch f48b90756, which fixed the problem the raid1 filesystem became read-only after one device of it was missing. But this fix method was not right, we should set the read-only flag according to the number of the missing devices, not the degraded mount option, if the number of the missing devices is less than the max error number that the profile of the chunk tolerates, we don't set it to be read-only. Cc: Josef Bacik <jbacik@fb.com> Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Reviewed-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions