diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2012-07-27 15:08:03 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-07-27 15:08:03 +0100 |
commit | f9a8e0cd261fc05820539b0ea613686a32795406 (patch) | |
tree | 0edf941f787dd10dd674111cfefbde5004348ef4 /drivers/md/dm-raid.c | |
parent | 4929630901100fdbfa19186ecf5ea2706f57719b (diff) | |
download | lwn-f9a8e0cd261fc05820539b0ea613686a32795406.tar.gz lwn-f9a8e0cd261fc05820539b0ea613686a32795406.zip |
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-raid.c')
0 files changed, 0 insertions, 0 deletions