dm stripe: optimize sector division
authorMikulas Patocka <mpatocka@redhat.com>
Thu, 12 Aug 2010 03:14:21 +0000 (04:14 +0100)
committerAlasdair G Kergon <agk@redhat.com>
Thu, 12 Aug 2010 03:14:21 +0000 (04:14 +0100)
commitc96053b767d494d7c30e2be68097ac9defa9403f
treeb66f185ffd58538f6107f3acf3af38b8aecd7f8a
parent65988525abde0b0a5833c4e20f32967184a5dcf0
dm stripe: optimize sector division

Optimize sector division: If the number of stripes is a power of two,
we can do shift and mask instead of division.

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