Btrfs: Add a write ahead tree log to optimize synchronous operations
authorChris Mason <chris.mason@oracle.com>
Fri, 5 Sep 2008 20:13:11 +0000 (16:13 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:04:07 +0000 (11:04 -0400)
commite02119d5a7b4396c5a872582fddc8bd6d305a70a
tree825efe2a79dbca8d61256183f3526a5b5dc40dc6
parenta1b32a5932cfac7c38b442582285f3da2a09dfd8
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>
17 files changed:
fs/btrfs/Makefile
fs/btrfs/btrfs_inode.h
fs/btrfs/compat.h
fs/btrfs/ctree.c
fs/btrfs/ctree.h
fs/btrfs/dir-item.c
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/root-tree.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h
fs/btrfs/tree-defrag.c
fs/btrfs/tree-log.c [new file with mode: 0644]
fs/btrfs/tree-log.h [new file with mode: 0644]