aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-06-26 10:06:50 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-06-26 10:06:50 -0400
commit4b52dff6d371b9b93bc99f64c32831ea9a8ec3ac (patch)
tree160a5fb1d8ab8e593775962aedac6ef770da7f3c /fs/btrfs/super.c
parent79c44584ea346024e929ac0f2a3577aac33b7b3f (diff)
Btrfs: Fix super block updates during transaction commit
The super block written during commit was not consistent with the state of the trees. This change adds an in-memory copy of the super so that we can make sure to write out consistent data during a commit. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index c11ecf500202..2e797d5fb281 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -144,7 +144,7 @@ static int btrfs_get_sb(struct file_system_type *fs_type,
144static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf) 144static int btrfs_statfs(struct dentry *dentry, struct kstatfs *buf)
145{ 145{
146 struct btrfs_root *root = btrfs_sb(dentry->d_sb); 146 struct btrfs_root *root = btrfs_sb(dentry->d_sb);
147 struct btrfs_super_block *disk_super = root->fs_info->disk_super; 147 struct btrfs_super_block *disk_super = &root->fs_info->super_copy;
148 148
149 buf->f_namelen = BTRFS_NAME_LEN; 149 buf->f_namelen = BTRFS_NAME_LEN;
150 buf->f_blocks = btrfs_super_total_blocks(disk_super); 150 buf->f_blocks = btrfs_super_total_blocks(disk_super);