From: Miao Xie Date: Wed, 5 Jan 2011 10:07:24 +0000 (+0000) Subject: btrfs: fix wrong calculation of stripe size X-Git-Tag: v2.6.38-rc1~14^2~11 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1974a3b42d8cf7a9c74f1e0310c593023617037a;p=pandora-kernel.git btrfs: fix wrong calculation of stripe size There are two tiny problem: - One is When we check the chunk size is greater than the max chunk size or not, we should take mirrors into account, but the original code didn't. - The other is btrfs shouldn't use the size of the residual free space as the length of of a dup chunk when doing chunk allocation. It is because the device space that a dup chunk needs is twice as large as the chunk size, if we use the size of the residual free space as the length of a dup chunk, we can not get enough free space. Fix it. Signed-off-by: Miao Xie Reviewed-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed