diff options
author | Josef Bacik <jbacik@fusionio.com> | 2012-12-18 15:16:16 +0100 |
---|---|---|
committer | Josef Bacik <jbacik@fusionio.com> | 2013-02-20 15:37:09 +0100 |
commit | c6b305a89b1903d63652691ad5eb9f05aa0326b8 (patch) | |
tree | 2b16ef4fb5c23e64ef0d0092674ebfaee3ac54d2 /fs/btrfs/transaction.h | |
parent | Btrfs: wait on ordered extents at the last possible moment (diff) | |
download | linux-c6b305a89b1903d63652691ad5eb9f05aa0326b8.tar.xz 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.h')
-rw-r--r-- | fs/btrfs/transaction.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index 0e8aa1e6c287..69700f7b20ac 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h @@ -68,6 +68,7 @@ struct btrfs_trans_handle { struct btrfs_block_rsv *orig_rsv; short aborted; short adding_csums; + bool allocating_chunk; enum btrfs_trans_type type; /* * this root is only needed to validate that the root passed to |