summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/btrfs_inode.h
diff options
context:
space:
mode:
authorChris Mason2008-09-05 22:13:11 +0200
committerChris Mason2008-09-25 17:04:07 +0200
commite02119d5a7b4396c5a872582fddc8bd6d305a70a (patch)
tree825efe2a79dbca8d61256183f3526a5b5dc40dc6 /fs/btrfs/btrfs_inode.h
parentBtrfs: Add debugging checks to track down corrupted metadata (diff)
downloadkernel-qcow2-linux-e02119d5a7b4396c5a872582fddc8bd6d305a70a.tar.gz
kernel-qcow2-linux-e02119d5a7b4396c5a872582fddc8bd6d305a70a.tar.xz
kernel-qcow2-linux-e02119d5a7b4396c5a872582fddc8bd6d305a70a.zip
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/btrfs_inode.h')
-rw-r--r--fs/btrfs/btrfs_inode.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/btrfs_inode.h b/fs/btrfs/btrfs_inode.h
index 111f90524ae1..fcc8cf27e906 100644
--- a/fs/btrfs/btrfs_inode.h
+++ b/fs/btrfs/btrfs_inode.h
@@ -33,6 +33,7 @@ struct btrfs_inode {
struct extent_io_tree io_failure_tree;
struct mutex csum_mutex;
struct mutex extent_mutex;
+ struct mutex log_mutex;
struct inode vfs_inode;
struct btrfs_ordered_inode_tree ordered_tree;
@@ -44,10 +45,17 @@ struct btrfs_inode {
struct list_head delalloc_inodes;
+ /* full 64 bit generation number */
+ u64 generation;
+
/*
* transid of the trans_handle that last modified this inode
*/
u64 last_trans;
+ /*
+ * transid that last logged this inode
+ */
+ u64 logged_trans;
u64 delalloc_bytes;
u64 disk_i_size;
u32 flags;