diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-02-22 11:39:13 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-02-22 11:39:13 -0500 |
commit | 5c680ed620c2b69cf751aecf1a5e03ce2c89c7f3 (patch) | |
tree | 53777ed1d7a37c8c619893a81fc68a9de07e5990 /fs/btrfs/disk-io.c | |
parent | cfaa72952fa7b44aa5d967cbc266110900552aef (diff) |
Btrfs: switch to early splits
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 2f71ccf1c3c..a696a4278ac 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -149,7 +149,8 @@ struct ctree_root *open_ctree(char *filename, struct ctree_super_block *super) | |||
149 | } | 149 | } |
150 | ret = pread(fp, super, sizeof(struct ctree_super_block), | 150 | ret = pread(fp, super, sizeof(struct ctree_super_block), |
151 | CTREE_SUPER_INFO_OFFSET(CTREE_BLOCKSIZE)); | 151 | CTREE_SUPER_INFO_OFFSET(CTREE_BLOCKSIZE)); |
152 | if (ret == 0) { | 152 | if (ret == 0 || super->root_info.tree_root == 0) { |
153 | printf("making new FS!\n"); | ||
153 | ret = mkfs(fp); | 154 | ret = mkfs(fp); |
154 | if (ret) | 155 | if (ret) |
155 | return NULL; | 156 | return NULL; |