btrfs-progs: mkfs/convert: separate the convert part from make_btrfs
[platform/upstream/btrfs-progs.git] / convert / main.c
index fd6f77b..8d9f29f 100644 (file)
@@ -336,7 +336,7 @@ static int record_file_blocks(struct blk_iterate_data *data,
                       key.offset > cur_off);
                fi = btrfs_item_ptr(node, slot, struct btrfs_file_extent_item);
                extent_disk_bytenr = btrfs_file_extent_disk_bytenr(node, fi);
-               extent_num_bytes = btrfs_file_extent_disk_num_bytes(node, fi);
+               extent_num_bytes = btrfs_file_extent_num_bytes(node, fi);
                BUG_ON(cur_off - key.offset >= extent_num_bytes);
                btrfs_release_path(&path);
 
@@ -2431,7 +2431,7 @@ static int do_convert(const char *devname, int datacsum, int packing,
        memset(mkfs_cfg.chunk_uuid, 0, BTRFS_UUID_UNPARSED_SIZE);
        memset(mkfs_cfg.fs_uuid, 0, BTRFS_UUID_UNPARSED_SIZE);
 
-       ret = make_btrfs(fd, &mkfs_cfg, &cctx);
+       ret = make_convert_btrfs(fd, &mkfs_cfg, &cctx);
        if (ret) {
                error("unable to create initial ctree: %s", strerror(-ret));
                goto fail;