summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2012-07-27 15:08:03 +0100
committerAlasdair G Kergon <agk@redhat.com>2012-07-27 15:08:03 +0100
commitf9a8e0cd261fc05820539b0ea613686a32795406 (patch)
tree0edf941f787dd10dd674111cfefbde5004348ef4 /drivers/md/dm-mpath.c
parent4929630901100fdbfa19186ecf5ea2706f57719b (diff)
downloadop-kernel-dev-f9a8e0cd261fc05820539b0ea613686a32795406.zip
op-kernel-dev-f9a8e0cd261fc05820539b0ea613686a32795406.tar.gz
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 <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-mpath.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud