diff options
author | Josef Bacik <jwhiter@redhat.com> | 2007-08-10 16:22:09 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-08-10 16:22:09 -0400 |
commit | 15ee9bc7ed171248d1405df5854da5fa91bfdc39 (patch) | |
tree | 5f29f51e1c14a6b35b2019a2ada5bb80fb97e2bd /fs/btrfs/transaction.h | |
parent | f2183bde1a918d338337955c8e8ba29bd8f5e7b1 (diff) |
Btrfs: delay commits during fsync to allow more writers
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r-- | fs/btrfs/transaction.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h index d5f491d3757e..e451783a1a4d 100644 --- a/fs/btrfs/transaction.h +++ b/fs/btrfs/transaction.h | |||
@@ -23,6 +23,7 @@ | |||
23 | struct btrfs_transaction { | 23 | struct btrfs_transaction { |
24 | u64 transid; | 24 | u64 transid; |
25 | unsigned long num_writers; | 25 | unsigned long num_writers; |
26 | unsigned long num_joined; | ||
26 | int in_commit; | 27 | int in_commit; |
27 | int use_count; | 28 | int use_count; |
28 | int commit_done; | 29 | int commit_done; |
@@ -57,6 +58,12 @@ static inline void btrfs_update_inode_block_group(struct | |||
57 | BTRFS_I(inode)->block_group = trans->block_group; | 58 | BTRFS_I(inode)->block_group = trans->block_group; |
58 | } | 59 | } |
59 | 60 | ||
61 | static inline void btrfs_set_inode_last_trans(struct btrfs_trans_handle *trans, | ||
62 | struct inode *inode) | ||
63 | { | ||
64 | BTRFS_I(inode)->last_trans = trans->transaction->transid; | ||
65 | } | ||
66 | |||
60 | int btrfs_end_transaction(struct btrfs_trans_handle *trans, | 67 | int btrfs_end_transaction(struct btrfs_trans_handle *trans, |
61 | struct btrfs_root *root); | 68 | struct btrfs_root *root); |
62 | struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root, | 69 | struct btrfs_trans_handle *btrfs_start_transaction(struct btrfs_root *root, |