summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorYan Zheng <zheng.yan@oracle.com>2008-11-18 10:40:06 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-18 10:40:06 -0500
commit4d1d3a59d6debe80ce1e2da60e82233ab8f1f886 (patch)
tree896a25411082e009b2699ef63a7dc9ae5d286bc3 /ctree.c
parent95470dfaf12dc8aa59bcb6829c4a7f759d2c5ff6 (diff)
downloadbtrfs-progs-4d1d3a59d6debe80ce1e2da60e82233ab8f1f886.tar.gz
update btrfs-progs for seed device support
This patch does the following: 1) Update device management code to match the kernel code. 2) Allocator fixes. 3) Add a program called btrfstune to set/clear the SEEDING super block flags.
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ctree.c b/ctree.c
index 84ebf2b..0d9797e 100644
--- a/ctree.c
+++ b/ctree.c
@@ -112,6 +112,10 @@ int btrfs_copy_root(struct btrfs_trans_handle *trans,
btrfs_set_header_owner(cow, new_root_objectid);
btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN);
+ write_extent_buffer(cow, root->fs_info->fsid,
+ (unsigned long)btrfs_header_fsid(cow),
+ BTRFS_FSID_SIZE);
+
WARN_ON(btrfs_header_generation(buf) > trans->transid);
ret = btrfs_inc_ref(trans, new_root, buf, cow, NULL);
kfree(new_root);
@@ -161,6 +165,10 @@ int __btrfs_cow_block(struct btrfs_trans_handle *trans,
btrfs_set_header_owner(cow, root->root_key.objectid);
btrfs_clear_header_flag(cow, BTRFS_HEADER_FLAG_WRITTEN);
+ write_extent_buffer(cow, root->fs_info->fsid,
+ (unsigned long)btrfs_header_fsid(cow),
+ BTRFS_FSID_SIZE);
+
WARN_ON(btrfs_header_generation(buf) > trans->transid);
if (btrfs_header_generation(buf) != trans->transid) {
different_trans = 1;