1 #ifndef __TRANSACTION__
2 #define __TRANSACTION__
4 struct btrfs_transaction {
6 unsigned long num_writers;
11 struct list_head list;
12 wait_queue_head_t writer_wait;
13 wait_queue_head_t commit_wait;
16 struct btrfs_trans_handle {
19 unsigned long blocks_reserved;
20 unsigned long blocks_used;
21 struct btrfs_transaction *transaction;
26 int btrfs_end_transaction(struct btrfs_trans_handle *trans,
27 struct btrfs_root *root);
28 struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
30 int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans,
31 struct btrfs_root *root);
32 int btrfs_commit_tree_roots(struct btrfs_trans_handle *trans,
33 struct btrfs_root *root);