diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-09-05 16:13:11 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:07 -0400 |
commit | e02119d5a7b4396c5a872582fddc8bd6d305a70a (patch) | |
tree | 825efe2a79dbca8d61256183f3526a5b5dc40dc6 /fs/btrfs/disk-io.h | |
parent | a1b32a5932cfac7c38b442582285f3da2a09dfd8 (diff) |
Btrfs: Add a write ahead tree log to optimize synchronous operations
File syncs and directory syncs are optimized by copying their
items into a special (copy-on-write) log tree. There is one log tree per
subvolume and the btrfs super block points to a tree of log tree roots.
After a crash, items are copied out of the log tree and back into the
subvolume. See tree-log.c for all the details.
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r-- | fs/btrfs/disk-io.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h index 2562a273ae18..6b6fdc697f31 100644 --- a/fs/btrfs/disk-io.h +++ b/fs/btrfs/disk-io.h | |||
@@ -45,7 +45,7 @@ struct btrfs_root *btrfs_lookup_fs_root(struct btrfs_fs_info *fs_info, | |||
45 | struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, | 45 | struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info, |
46 | struct btrfs_key *location, | 46 | struct btrfs_key *location, |
47 | const char *name, int namelen); | 47 | const char *name, int namelen); |
48 | struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_fs_info *fs_info, | 48 | struct btrfs_root *btrfs_read_fs_root_no_radix(struct btrfs_root *tree_root, |
49 | struct btrfs_key *location); | 49 | struct btrfs_key *location); |
50 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, | 50 | struct btrfs_root *btrfs_read_fs_root_no_name(struct btrfs_fs_info *fs_info, |
51 | struct btrfs_key *location); | 51 | struct btrfs_key *location); |
@@ -74,4 +74,10 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode, | |||
74 | extent_submit_bio_hook_t *submit_bio_hook); | 74 | extent_submit_bio_hook_t *submit_bio_hook); |
75 | int btrfs_congested_async(struct btrfs_fs_info *info, int iodone); | 75 | int btrfs_congested_async(struct btrfs_fs_info *info, int iodone); |
76 | unsigned long btrfs_async_submit_limit(struct btrfs_fs_info *info); | 76 | unsigned long btrfs_async_submit_limit(struct btrfs_fs_info *info); |
77 | int btrfs_write_tree_block(struct extent_buffer *buf); | ||
78 | int btrfs_wait_tree_block_writeback(struct extent_buffer *buf); | ||
79 | int btrfs_free_log_root_tree(struct btrfs_trans_handle *trans, | ||
80 | struct btrfs_fs_info *fs_info); | ||
81 | int btrfs_init_log_root_tree(struct btrfs_trans_handle *trans, | ||
82 | struct btrfs_fs_info *fs_info); | ||
77 | #endif | 83 | #endif |