Commit 5c680ed6 authored by Chris Mason's avatar Chris Mason Committed by David Woodhouse

Btrfs: switch to early splits

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent cfaa7295
This diff is collapsed.
......@@ -149,7 +149,8 @@ struct ctree_root *open_ctree(char *filename, struct ctree_super_block *super)
}
ret = pread(fp, super, sizeof(struct ctree_super_block),
CTREE_SUPER_INFO_OFFSET(CTREE_BLOCKSIZE));
if (ret == 0) {
if (ret == 0 || super->root_info.tree_root == 0) {
printf("making new FS!\n");
ret = mkfs(fp);
if (ret)
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment