Mike Snitzer 55f2b8bdb0 dm thin: support for non power of 2 pool blocksize
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>
2012-07-27 15:08:02 +01:00
..
2012-03-28 18:41:29 +01:00
2012-03-28 18:41:29 +01:00
2012-07-27 15:07:59 +01:00
2012-03-07 19:09:37 +00:00
2012-03-28 18:43:38 +01:00
2010-08-12 04:14:12 +01:00
2011-10-31 20:19:04 +00:00
2012-03-19 12:46:39 +11:00
2012-03-28 18:43:38 +01:00
2012-07-03 17:45:31 +10:00
2012-05-22 13:55:05 +10:00
2012-07-04 09:35:35 +10:00
2012-05-22 13:53:47 +10:00