aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-06-07 15:07:51 -0400
committerJosef Bacik <josef@redhat.com>2011-07-11 09:58:47 -0400
commitb5009945be18023942ce28327893c7bc1e58fe54 (patch)
treefe2e04196c833a3b609a1cf947293aafcf90a7bd /fs/btrfs/ctree.h
parentfa09200b8334f9a6af3f656edae924a98d85630f (diff)
Btrfs: do transaction space reservation before joining the transaction
We have to do weird things when handling enospc in the transaction joining code. Because we've already joined the transaction we cannot commit the transaction within the reservation code since it will deadlock, so we have to return EAGAIN and then make sure we don't retry too many times. Instead of doing this, just do the reservation the normal way before we join the transaction, that way we can do whatever we want to try and reclaim space, and then if it fails we know for sure we are out of space and we can return ENOSPC. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 60e13ef23a5..28e170bcdcb 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -2223,9 +2223,6 @@ void btrfs_set_inode_space_info(struct btrfs_root *root, struct inode *ionde);
2223void btrfs_clear_space_info_full(struct btrfs_fs_info *info); 2223void btrfs_clear_space_info_full(struct btrfs_fs_info *info);
2224int btrfs_check_data_free_space(struct inode *inode, u64 bytes); 2224int btrfs_check_data_free_space(struct inode *inode, u64 bytes);
2225void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes); 2225void btrfs_free_reserved_data_space(struct inode *inode, u64 bytes);
2226int btrfs_trans_reserve_metadata(struct btrfs_trans_handle *trans,
2227 struct btrfs_root *root,
2228 int num_items);
2229void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans, 2226void btrfs_trans_release_metadata(struct btrfs_trans_handle *trans,
2230 struct btrfs_root *root); 2227 struct btrfs_root *root);
2231int btrfs_orphan_reserve_metadata(struct btrfs_trans_handle *trans, 2228int btrfs_orphan_reserve_metadata(struct btrfs_trans_handle *trans,