From: Josef Bacik Date: Sun, 28 Jun 2009 01:07:34 +0000 (-0400) Subject: Btrfs: account for space we may use in fallocate X-Git-Tag: v2.6.31-rc2~10^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a970b0a16cc416a509d5ae8b1d70978664e6f4fe;p=pandora-kernel.git Btrfs: account for space we may use in fallocate Using Eric Sandeen's xfstest for fallocate, you can easily trigger a ENOSPC panic on btrfs. This is because we do not account for data we may use when doing the fallocate. This patch fixes the problem by properly reserving space, and then just freeing it when we are done. The reservation stuff was made with delalloc in mind, so its a little crude for this case, but it keeps the box from panicing. Signed-off-by: Josef Bacik Signed-off-by: Chris Mason --- Reading git-diff-tree failed