aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-10-29 14:49:05 -0400
committerChris Mason <chris.mason@oracle.com>2008-10-29 14:49:05 -0400
commit84234f3a1f7c532e4afeba03cc8e7e4a8a5277ea (patch)
treec41f249b448f28b648b21c3898d0763b9c67ca6a /fs/btrfs/extent-tree.c
parent2517920135b0d29e70453e5b03d70d7b94207df3 (diff)
Btrfs: Add root tree pointer transaction ids
This patch adds transaction IDs to root tree pointers. Transaction IDs in tree pointers are compared with the generation numbers in block headers when reading root blocks of trees. This can detect some types of IO errors. Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 564260872c7e..155c8dc56a22 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4428,6 +4428,7 @@ static int noinline init_reloc_tree(struct btrfs_trans_handle *trans,
4428 btrfs_set_root_refs(root_item, 0); 4428 btrfs_set_root_refs(root_item, 0);
4429 btrfs_set_root_bytenr(root_item, eb->start); 4429 btrfs_set_root_bytenr(root_item, eb->start);
4430 btrfs_set_root_level(root_item, btrfs_header_level(eb)); 4430 btrfs_set_root_level(root_item, btrfs_header_level(eb));
4431 btrfs_set_root_generation(root_item, trans->transid);
4431 4432
4432 btrfs_tree_unlock(eb); 4433 btrfs_tree_unlock(eb);
4433 free_extent_buffer(eb); 4434 free_extent_buffer(eb);