diff options
author | Mike Snitzer <snitzer@redhat.com> | 2012-10-12 21:02:07 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2012-10-12 21:02:07 +0100 |
commit | 28eed34e7662d7602da6753b0ba2563006b8e7a2 (patch) | |
tree | 0aeeda160b7cccfb77be58d47084a8e606905bf7 /drivers/md/dm-region-hash.c | |
parent | 0bcf08798eb9fc3cd0fe2e6b74b25f3f57fa8af2 (diff) | |
download | blackbird-obmc-linux-28eed34e7662d7602da6753b0ba2563006b8e7a2.tar.gz blackbird-obmc-linux-28eed34e7662d7602da6753b0ba2563006b8e7a2.zip |
dm thin: support discard with non power of two block size
Support discards when the pool's block size is not a power of 2.
The block layer assumes discard_granularity is a power of 2 (in
blkdev_issue_discard), so we set this to the largest power of 2 that is
a divides into the number of sectors in each block, but never less than
DATA_DEV_BLOCK_SIZE_MIN_SECTORS.
This patch eliminates the "Discard support must be disabled when the
block size is not a power of 2" constraint that was imposed in commit
55f2b8b ("dm thin: support for non power of 2 pool blocksize"). That
commit was incomplete: using a block size that is not a power of 2
shouldn't mean disabling discard support on the device completely.
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-region-hash.c')
0 files changed, 0 insertions, 0 deletions