Skip to content

Commit

Permalink
Btrfs: Avoid 64 bit div for RAID10
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 3b95151 commit 7bf3b49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/volumes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7bf3b49

Please sign in to comment.