diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-12-18 09:16:16 -0500 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 09:37:09 -0500 |
commit | c6b305a89b1903d63652691ad5eb9f05aa0326b8 (patch) | |
tree | 2b16ef4fb5c23e64ef0d0092674ebfaee3ac54d2 /fs/btrfs/transaction.c | |
parent | 2ab28f322f9896782da904f5942f3873432addc8 (diff) | |
download | blackbird-op-linux-c6b305a89b1903d63652691ad5eb9f05aa0326b8.tar.gz blackbird-op-linux-c6b305a89b1903d63652691ad5eb9f05aa0326b8.zip |
Btrfs: don't re-enter when allocating a chunk
If we start running low on metadata space we will try to allocate a chunk,
which could then try to allocate a chunk to add the device entry. The thing
is we allocate a chunk before we try really hard to make the allocation, so
we should be able to find space for the device entry. Add a flag to the
trans handle so we know we're currently allocating a chunk so we can just
bail out if we try to allocate another chunk. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 86bb105b3982..24fde97cba81 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -385,6 +385,7 @@ again: h->qgroup_reserved = qgroup_reserved; h->delayed_ref_elem.seq = 0; h->type = type; + h->allocating_chunk = false; INIT_LIST_HEAD(&h->qgroup_ref_list); INIT_LIST_HEAD(&h->new_bgs); |