aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/tree-log.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-12-08 16:46:26 -0500
committerChris Mason <chris.mason@oracle.com>2008-12-08 16:46:26 -0500
commita512bbf855ff0af474257475f2e6da7acd854f52 (patch)
tree1b2cfcf4152e09f32a6cb0bcbd798d5dab2f5490 /fs/btrfs/tree-log.c
parentd20f7043fa65659136c1a7c3c456eeeb5c6f431f (diff)
Btrfs: superblock duplication
This patch implements superblock duplication. Superblocks are stored at offset 16K, 64M and 256G on every devices. Spaces used by superblocks are preserved by the allocator, which uses a reverse mapping function to find the logical addresses that correspond to superblocks. Thank you, Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
-rw-r--r--fs/btrfs/tree-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c
index 08469ec05850..d3f9c2c663c4 100644
--- a/fs/btrfs/tree-log.c
+++ b/fs/btrfs/tree-log.c
@@ -1996,7 +1996,7 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
1996 btrfs_set_super_log_root_level(&root->fs_info->super_for_commit, 1996 btrfs_set_super_log_root_level(&root->fs_info->super_for_commit,
1997 btrfs_header_level(log->fs_info->log_root_tree->node)); 1997 btrfs_header_level(log->fs_info->log_root_tree->node));
1998 1998
1999 write_ctree_super(trans, log->fs_info->tree_root); 1999 write_ctree_super(trans, log->fs_info->tree_root, 2);
2000 log->fs_info->tree_log_transid++; 2000 log->fs_info->tree_log_transid++;
2001 log->fs_info->tree_log_batch = 0; 2001 log->fs_info->tree_log_batch = 0;
2002 atomic_set(&log->fs_info->tree_log_commit, 0); 2002 atomic_set(&log->fs_info->tree_log_commit, 0);
@@ -2006,7 +2006,6 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
2006out: 2006out:
2007 mutex_unlock(&log->fs_info->tree_log_mutex); 2007 mutex_unlock(&log->fs_info->tree_log_mutex);
2008 return 0; 2008 return 0;
2009
2010} 2009}
2011 2010
2012/* * free all the extents used by the tree log. This should be called 2011/* * free all the extents used by the tree log. This should be called