Commit 7bf3b490 authored by Chris Mason's avatar Chris Mason

Btrfs: Avoid 64 bit div for RAID10

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 3b951516
......@@ -724,7 +724,7 @@ int btrfs_alloc_chunk(struct btrfs_trans_handle *trans,
if (type & (BTRFS_BLOCK_GROUP_RAID1 | BTRFS_BLOCK_GROUP_DUP))
*num_bytes = calc_size;
else if (type & BTRFS_BLOCK_GROUP_RAID10)
*num_bytes = calc_size * num_stripes / sub_stripes;
*num_bytes = calc_size * (num_stripes / sub_stripes);
else
*num_bytes = calc_size * num_stripes;
......
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