Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347953
b: refs/heads/master
c: 3a0f9aa
h: refs/heads/master
i:
  347951: 2d9eea6
v: v3
  • Loading branch information
Jonathan Brassow authored and Alasdair G Kergon committed Dec 21, 2012
1 parent a88945d commit ee3ae0b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2aab38502d0e1bf6cf98183769e35a9ff999dcb1
refs/heads/master: 3a0f9aaee02857609d79b20c809c02a8b7c39d06
4 changes: 3 additions & 1 deletion trunk/drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@ static int validate_region_size(struct raid_set *rs, unsigned long region_size)
* Choose a reasonable default. All figures in sectors.
*/
if (min_region_size > (1 << 13)) {
/* If not a power of 2, make it the next power of 2 */
if (min_region_size & (min_region_size - 1))
region_size = 1 << fls(region_size);
DMINFO("Choosing default region size of %lu sectors",
region_size);
region_size = min_region_size;
} else {
DMINFO("Choosing default region size of 4MiB");
region_size = 1 << 13; /* sectors */
Expand Down

0 comments on commit ee3ae0b

Please sign in to comment.