summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-20 20:35:03 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-20 20:35:03 -0400
commit1261ec42b3d3a3ad878bd172144940e3ac710749 (patch)
tree4b317d8fa13e56a5dd02f37605b9fed5952d723a /fs/btrfs/disk-io.c
parent293ffd5fd340428276fbbd24ce7b98bf6728466b (diff)
Btrfs: Better block record keeping, real mkfs
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index bacaa38ea82..0322c55162c 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -293,20 +293,15 @@ struct btrfs_root *open_ctree(char *filename, struct btrfs_super_block *super)
fs_info->inode_root = inode_root;
fs_info->last_inode_alloc = 0;
fs_info->last_inode_alloc_dirid = 0;
+ fs_info->disk_super = super;
memset(&fs_info->current_insert, 0, sizeof(fs_info->current_insert));
memset(&fs_info->last_insert, 0, sizeof(fs_info->last_insert));
ret = pread(fp, super, sizeof(struct btrfs_super_block),
BTRFS_SUPER_INFO_OFFSET);
if (ret == 0 || btrfs_super_root(super) == 0) {
- printf("making new FS!\n");
- ret = mkfs(fp, 0, 1024);
- if (ret)
- return NULL;
- ret = pread(fp, super, sizeof(struct btrfs_super_block),
- BTRFS_SUPER_INFO_OFFSET);
- if (ret != sizeof(struct btrfs_super_block))
- return NULL;
+ BUG();
+ return NULL;
}
BUG_ON(ret < 0);