summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/sysfs.c
diff options
context:
space:
mode:
authorMiao Xie <miaox@cn.fujitsu.com>2014-07-24 05:37:14 +0200
committerChris Mason <clm@fb.com>2014-08-19 17:52:19 +0200
commit95669976bd7d30ae265db938ecb46a6b7f8cb893 (patch)
treefd84dbccfed69517364018ce02d4b22814b3f28e /fs/btrfs/sysfs.c
parentBtrfs: Fix wrong device size when we are resizing the device (diff)
downloadlinux-95669976bd7d30ae265db938ecb46a6b7f8cb893.tar.xz
linux-95669976bd7d30ae265db938ecb46a6b7f8cb893.zip
Btrfs: don't consider the missing device when allocating new chunks
The original code allocated new chunks by the number of the writable devices and missing devices to make sure that any RAID levels on a degraded FS continue to be honored, but it introduced a problem that it stopped us to allocating new chunks, the steps to reproduce is following: # mkfs.btrfs -m raid1 -d raid1 -f <dev0> <dev1> # mkfs.btrfs -f <dev1> //Removing <dev1> from the original fs # mount -o degraded <dev0> <mnt> # dd if=/dev/null of=<mnt>/tmpfile bs=1M It is because we allocate new chunks only on the writable devices, if we take the number of missing devices into account, and want to allocate new chunks with higher RAID level, we will fail becaue we don't have enough writable device. Fix it by ignoring the number of missing devices when allocating new chunks. Signed-off-by: Miao Xie <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/sysfs.c')
0 files changed, 0 insertions, 0 deletions