summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-04-23 17:00:26 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-04-23 17:00:26 -0400
commit885f275a68f6702fb2f309fa925681419ab45a13 (patch)
treefde7f6ce50877f10ff9f106281eba5568d69c235 /mkfs.c
parentd7260c060c24444c35479f39e480e0a147ff9c7b (diff)
fsck checks against extent map, small fixes
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mkfs.c b/mkfs.c
index b307470f..0097d538 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -215,6 +215,8 @@ int mkfs(int fd, char *pathname, u64 num_blocks, u32 blocksize)
btrfs_set_item_offset(&item, itemoff);
btrfs_set_item_size(&item, sizeof(struct btrfs_extent_item));
btrfs_set_extent_refs(&extent_item, 1);
+ btrfs_set_extent_owner(&extent_item, BTRFS_ROOT_TREE_OBJECTID);
+ btrfs_set_extent_type(&extent_item, BTRFS_EXTENT_TREE);
memcpy(empty_leaf->items, &item, sizeof(item));
memcpy(btrfs_leaf_data(empty_leaf) + btrfs_item_offset(&item),
&extent_item, btrfs_item_size(&item));