]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - fs/btrfs/transaction.h
Btrfs: prealloc more blocks for the extent map
[mirror_ubuntu-artful-kernel.git] / fs / btrfs / transaction.h
CommitLineData
e089f05c
CM
1#ifndef __TRANSACTION__
2#define __TRANSACTION__
3
79154b1b
CM
4struct btrfs_transaction {
5 u64 transid;
6 unsigned long num_writers;
7 int in_commit;
8 int use_count;
9 int commit_done;
2c90e5d6 10 int magic;
8fd17795 11 struct list_head list;
7c4452b9 12 struct radix_tree_root dirty_pages;
79154b1b
CM
13 wait_queue_head_t writer_wait;
14 wait_queue_head_t commit_wait;
15};
16
e089f05c 17struct btrfs_trans_handle {
2c90e5d6 18 int magic;
e089f05c
CM
19 u64 transid;
20 unsigned long blocks_reserved;
21 unsigned long blocks_used;
79154b1b 22 struct btrfs_transaction *transaction;
2c90e5d6 23 int magic2;
e089f05c
CM
24};
25
e089f05c 26
79154b1b
CM
27int btrfs_end_transaction(struct btrfs_trans_handle *trans,
28 struct btrfs_root *root);
29struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
30 int num_blocks);
31int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans,
32 struct btrfs_root *root);
33int btrfs_commit_tree_roots(struct btrfs_trans_handle *trans,
34 struct btrfs_root *root);
e089f05c 35#endif