map->sub_stripes = sub_stripes;
  
        *map_ret = map;
-       *stripe_size = calc_size;
-       *num_bytes = chunk_bytes_by_type(type, calc_size,
-                                        map->num_stripes, sub_stripes);
+       num_bytes = stripe_size * (num_stripes / ncopies);
+ 
+       *stripe_size_out = stripe_size;
+       *num_bytes_out = num_bytes;
  
-       trace_btrfs_chunk_alloc(info->chunk_root, map, start, *num_bytes);
+       trace_btrfs_chunk_alloc(info->chunk_root, map, start, num_bytes);
  
 -      em = alloc_extent_map(GFP_NOFS);
 +      em = alloc_extent_map();
        if (!em) {
                ret = -ENOMEM;
                goto error;