From: Chris Mason Date: Wed, 16 Feb 2011 18:57:04 +0000 (-0500) Subject: Btrfs: allow balance to explicitly allocate chunks as it relocates X-Git-Tag: v2.6.38-rc7~30^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c87f08ca44e83b2c8d28f63f9c33f3a270a04bbe;p=pandora-kernel.git Btrfs: allow balance to explicitly allocate chunks as it relocates Btrfs device shrinking and balancing ends up reallocating all the blocks in order to allow COW to move them to new destinations. It is somewhat awkward in terms of ENOSPC because most of the enospc code is built around the idea that some operation on a reference counted tree triggers allocations in the non-reference counted trees. This commit changes the balancing code to deal with enospc by trying to allocate a new chunk. If that allocation succeeds, we go ahead and retry whatever failed due to enospc. Signed-off-by: Chris Mason --- Reading git-diff-tree failed