]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Btrfs: use the global reserve as a backup for deleting inodes
authorJosef Bacik <josef@redhat.com>
Mon, 26 Sep 2011 19:46:06 +0000 (15:46 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 16 Nov 2011 02:20:25 +0000 (21:20 -0500)
commit198e40392d4955f3fa679b26d817711e24afc4cb
treeb88821e1036e0c95c913dfc316deefaeadd2b777
parentfa0d7af219fe5ebe9b50fdd940d12d1ed33395a2
Btrfs: use the global reserve as a backup for deleting inodes

Xfstests 83 really stresses our ENOSPC since it uses a 100mb fs which ends up
with the mixed block group stuff.  Because of this we can run into a situation
where we don't have enough space to delete inodes, or even worse we can't free
the inodes when we next mount the fs which causes the orphan code to lose its
mind.  So if we fail to make our reservation, steal from the global reserve.
The global reserve will end up taking up the entire rest of the free space on
the fs in this worst case so there really is no other option.  With this patch
test 83 doesn't freak out.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
(cherry picked from commit 726c35fa0edf1d9b8a88b73255532e73089aedda)
fs/btrfs/inode.c