From: Mikulas Patocka Date: Fri, 27 Jul 2012 14:08:03 +0000 (+0100) Subject: dm thin: optimize power of two block size X-Git-Tag: v3.6-rc1~56^2~44 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9a8e0cd261fc05820539b0ea613686a32795406;p=pandora-kernel.git dm thin: optimize power of two block size dm-thin will be most likely used with a block size that is a power of two. So it should be optimized for this case. This patch changes division and modulo operations to shifts and bit masks if block size is a power of two. A test that bi_sector is divisible by a block size is removed from io_overlaps_block. Device mapper never sends bios that span a block boundary. Consequently, if we tested that bi_size is equivalent to block size, bi_sector must already be on a block boundary. Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon --- Reading git-diff-tree failed