diff options
author | Josef Bacik <josef@redhat.com> | 2011-08-30 12:34:28 -0400 |
---|---|---|
committer | Josef Bacik <josef@redhat.com> | 2011-10-19 15:12:44 -0400 |
commit | 4a92b1b8d2810db4ea0c34616b94c0b3810fa027 (patch) | |
tree | dd01cff1987b8178be84f8b750951497b7f525a7 /fs/btrfs/ctree.h | |
parent | d02c9955ded7fc56dd1edc987558b084ccb03eb4 (diff) |
Btrfs: stop passing a trans handle all around the reservation code
The only thing that we need to have a trans handle for is in
reserve_metadata_bytes and thats to know how much flushing we can do. So
instead of passing it around, just check current->journal_info for a
trans_handle so we know if we can commit a transaction to try and free up space
or not. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index caa73cd8c00a..a5faf8e33baa 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -2237,12 +2237,10 @@ void btrfs_init_block_rsv(struct btrfs_block_rsv *rsv); | |||
2237 | struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root); | 2237 | struct btrfs_block_rsv *btrfs_alloc_block_rsv(struct btrfs_root *root); |
2238 | void btrfs_free_block_rsv(struct btrfs_root *root, | 2238 | void btrfs_free_block_rsv(struct btrfs_root *root, |
2239 | struct btrfs_block_rsv *rsv); | 2239 | struct btrfs_block_rsv *rsv); |
2240 | int btrfs_block_rsv_add(struct btrfs_trans_handle *trans, | 2240 | int btrfs_block_rsv_add(struct btrfs_root *root, |
2241 | struct btrfs_root *root, | ||
2242 | struct btrfs_block_rsv *block_rsv, | 2241 | struct btrfs_block_rsv *block_rsv, |
2243 | u64 num_bytes); | 2242 | u64 num_bytes); |
2244 | int btrfs_block_rsv_check(struct btrfs_trans_handle *trans, | 2243 | int btrfs_block_rsv_check(struct btrfs_root *root, |
2245 | struct btrfs_root *root, | ||
2246 | struct btrfs_block_rsv *block_rsv, | 2244 | struct btrfs_block_rsv *block_rsv, |
2247 | u64 min_reserved, int min_factor, int flush); | 2245 | u64 min_reserved, int min_factor, int flush); |
2248 | int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src_rsv, | 2246 | int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src_rsv, |