dm stripe: optimize chunk_size calculations
authorMikulas Patocka <mpatocka@redhat.com>
Fri, 27 Jul 2012 14:08:02 +0000 (15:08 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Fri, 27 Jul 2012 14:08:02 +0000 (15:08 +0100)
commit33d07c0dfab902a7c5420587984497dc05ab5c9c
treea81d17ca4633bc43a5fc0959754df43c109a0b63
parent8f069b41bce79b0c4b6076acd0f3d15df0a232ed
dm stripe: optimize chunk_size calculations

dm-stripe is usually used with a chunk size that is a power of two.
Use faster shifts and bit masks in such cases.

stripe_width is already optimized in a similar way.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm-stripe.c