]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Non power of 2 blocksize support is needed to properly align thinp IO
authorMike Snitzer <snitzer@redhat.com>
Tue, 24 Jul 2012 23:25:16 +0000 (09:25 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 24 Jul 2012 23:25:16 +0000 (09:25 +1000)
commit59d0c7d15a93d764cdb854b69967fdc95dbf2dc4
treeaca2de16a6e3ef66ea84a9883a2e0d6afa7234d4
parent8345799faa0a0b20c9bf44b976b33f181bc29cf4
Non power of 2 blocksize support is needed to properly align thinp IO
on storage that has non power of 2 optimal IO sizes (e.g. RAID6 10+2).

Use sector_div to support non power of 2 blocksize for the pool's
data device.  This provides comparable performance to the power of 2
math that was performed until now (as tested on modern x86_64 hardware).

The kernel currently assumes that limits->discard_granularity is a power
of two so the thin target only enables discard support if the block
size is a power of two.

Eliminate pool structure's 'block_shift', 'offset_mask' and
remaining 4 byte holes.

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