提交 7bf3b490 编写于 作者: C Chris Mason

Btrfs: Avoid 64 bit div for RAID10

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册