Btrfs: directory inode index is back
[linux-2.6-block.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;
79154b1b
CM
11 wait_queue_head_t writer_wait;
12 wait_queue_head_t commit_wait;
13};
14
e089f05c 15struct btrfs_trans_handle {
2c90e5d6 16 int magic;
e089f05c
CM
17 u64 transid;
18 unsigned long blocks_reserved;
19 unsigned long blocks_used;
79154b1b 20 struct btrfs_transaction *transaction;
2c90e5d6 21 int magic2;
e089f05c
CM
22};
23
e089f05c 24
79154b1b
CM
25int btrfs_end_transaction(struct btrfs_trans_handle *trans,
26 struct btrfs_root *root);
27struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root,
28 int num_blocks);
29int btrfs_write_and_wait_transaction(struct btrfs_trans_handle *trans,
30 struct btrfs_root *root);
31int btrfs_commit_tree_roots(struct btrfs_trans_handle *trans,
32 struct btrfs_root *root);
e089f05c 33#endif