diff options
author | Lukas Czerner <lczerner@redhat.com> | 2014-06-11 12:28:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 11:14:01 -0700 |
commit | 563d232b4c54c5c4433926ab299dfb729a283372 (patch) | |
tree | 6c917d63a6a59cc1c5f592a61172248e09bfa253 /drivers/scsi/qlogicpti.h | |
parent | f2f90dd36487290ff0bf60e341839a606045aef8 (diff) |
dm thin: update discard_granularity to reflect the thin-pool blocksize
commit 09869de57ed2728ae3c619803932a86cb0e2c4f8 upstream.
DM thinp already checks whether the discard_granularity of the data
device is a factor of the thin-pool block size. But when using the
dm-thin-pool's discard passdown support, DM thinp was not selecting the
max of the underlying data device's discard_granularity and the
thin-pool's block size.
Update set_discard_limits() to set discard_granularity to the max of
these values. This enables blkdev_issue_discard() to properly align the
discards that are sent to the DM thin device on a full block boundary.
As such each discard will now cover an entire DM thin-pool block and the
block will be reclaimed.
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/qlogicpti.h')
0 files changed, 0 insertions, 0 deletions