]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: round region_size to power of two
authorJonathan Brassow <jbrassow@redhat.com>
Fri, 21 Dec 2012 20:23:33 +0000 (20:23 +0000)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 21 Dec 2012 20:23:33 +0000 (20:23 +0000)
commit4604e324d99b18ba44353571a40dc195c02b0c16
tree274ae68dfc2d955bb8f9a771388947e947b359b4
parent18101a7c0b5a950216a1ccd410d6b9ed8811fc01
dm raid: round region_size to power of two

If the user does not supply a bitmap region_size to the dm raid target,
a reasonable size is computed automatically.  If this is not a power of 2,
the md code will report an error later.

This patch catches the problem early and rounds the region_size to the
next power of two.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-raid.c