Lukas Czerner 09869de57e dm thin: update discard_granularity to reflect the thin-pool blocksize
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>
Cc: stable@vger.kernel.org
2014-06-11 16:56:12 -04:00
..
2014-01-14 23:23:03 -05:00
2013-11-23 22:33:47 -08:00
2013-11-09 18:20:22 -05:00
2013-08-23 09:02:13 -04:00
2013-11-23 22:33:47 -08:00
2012-07-30 17:25:16 -07:00
2014-06-04 09:45:52 -04:00
2013-09-05 20:46:06 -04:00
2013-11-23 22:33:47 -08:00
2013-11-23 22:33:47 -08:00
2014-01-14 23:23:04 -05:00
2007-10-20 02:01:26 +01:00
2013-03-01 22:45:47 +00:00
2014-03-27 16:56:24 -04:00
2013-11-23 22:33:47 -08:00
2014-03-27 16:56:23 -04:00
2013-11-23 22:33:57 -08:00
2014-03-27 16:56:23 -04:00
2013-11-23 22:33:47 -08:00
2013-11-23 22:33:57 -08:00
2013-11-20 13:05:25 -08:00