aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.h
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-08 15:46:30 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:59 -0400
commitdc17ff8f11d129db9e83ab7244769e4eae05e14d (patch)
tree622e70100d6082e371a6ca62b02fd57e0c37f8dc /fs/btrfs/transaction.h
parente4204dedbbaa3a614605cb83cc0ac5161af6b4e6 (diff)
Btrfs: Add data=ordered support
This forces file data extents down the disk along with the metadata that references them. The current implementation is fairly simple, and just writes out all of the dirty pages in an inode before the commit. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.h')
-rw-r--r--fs/btrfs/transaction.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/btrfs/transaction.h b/fs/btrfs/transaction.h
index eef840bca91e..c157ddbe9d1e 100644
--- a/fs/btrfs/transaction.h
+++ b/fs/btrfs/transaction.h
@@ -16,9 +16,10 @@
16 * Boston, MA 021110-1307, USA. 16 * Boston, MA 021110-1307, USA.
17 */ 17 */
18 18
19#ifndef __TRANSACTION__ 19#ifndef __BTRFS_TRANSACTION__
20#define __TRANSACTION__ 20#define __BTRFS_TRANSACTION__
21#include "btrfs_inode.h" 21#include "btrfs_inode.h"
22#include "ordered-data.h"
22 23
23struct btrfs_transaction { 24struct btrfs_transaction {
24 u64 transid; 25 u64 transid;
@@ -30,6 +31,7 @@ struct btrfs_transaction {
30 struct list_head list; 31 struct list_head list;
31 struct extent_map_tree dirty_pages; 32 struct extent_map_tree dirty_pages;
32 unsigned long start_time; 33 unsigned long start_time;
34 struct btrfs_ordered_inode_tree ordered_inode_tree;
33 wait_queue_head_t writer_wait; 35 wait_queue_head_t writer_wait;
34 wait_queue_head_t commit_wait; 36 wait_queue_head_t commit_wait;
35}; 37};
@@ -90,4 +92,6 @@ int btrfs_defrag_root(struct btrfs_root *root, int cacheonly);
90int btrfs_clean_old_snapshots(struct btrfs_root *root); 92int btrfs_clean_old_snapshots(struct btrfs_root *root);
91int btrfs_commit_transaction(struct btrfs_trans_handle *trans, 93int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
92 struct btrfs_root *root); 94 struct btrfs_root *root);
95int btrfs_write_ordered_inodes(struct btrfs_trans_handle *trans,
96 struct btrfs_root *root);
93#endif 97#endif