diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2015-10-02 11:17:37 -0400 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-10-27 22:13:32 -0400 |
commit | 545d252508fd550d5510ceca484416f7cc866c79 (patch) | |
tree | 2b65764a101e6b0f47d7cc178a0145e6d3689cd0 /net | |
parent | 798191c20d0b883aa9cdb8919aacaa5c5eca5e4c (diff) |
dm raid: fix round up of default region size
[ Upstream commit 042745ee53a0a7c1f5aff191a4a24213c6dcfb52 ]
Commit 3a0f9aaee028 ("dm raid: round region_size to power of two")
intended to make sure that the default region size is a power of two.
However, the logic in that commit is incorrect and sets the variable
region_size to 0 or 1, depending on whether min_region_size is a power
of two.
Fix this logic, using roundup_pow_of_two(), so that region_size is
properly rounded up to the next power of two.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: 3a0f9aaee028 ("dm raid: round region_size to power of two")
Cc: stable@vger.kernel.org # v3.8+
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions