Btrfs: stop trying to shrink delalloc if there are no inodes to reclaim
authorJosef Bacik <josef@redhat.com>
Thu, 16 Sep 2010 18:29:55 +0000 (14:29 -0400)
committerJosef Bacik <josef@redhat.com>
Fri, 22 Oct 2010 19:54:51 +0000 (15:54 -0400)
commita1f765061e1491d5ec467429d0d6adfd9df2f6d9
tree0263688d261b69aedf2dad690ac1d93f875eec78
parent9fe6206f400646a2322096b56c59891d530e8d51
Btrfs: stop trying to shrink delalloc if there are no inodes to reclaim

In very severe ENOSPC cases we can run out of inodes to do delalloc on, which
means we'll just keep looping trying to shrink delalloc.  Instead, if we fail to
shrink delalloc 3 times in a row break out since we're not likely to make any
progress.  Tested this with a 100mb fs an xfstests test 13.  Before the patch it
would hang the box, with the patch we get -ENOSPC like we should.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
fs/btrfs/extent-tree.c