aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index a0bdd562e026..fc9c848a60c9 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -3094,7 +3094,8 @@ static void set_discard_limits(struct pool_c *pt, struct queue_limits *limits)
3094 */ 3094 */
3095 if (pt->adjusted_pf.discard_passdown) { 3095 if (pt->adjusted_pf.discard_passdown) {
3096 data_limits = &bdev_get_queue(pt->data_dev->bdev)->limits; 3096 data_limits = &bdev_get_queue(pt->data_dev->bdev)->limits;
3097 limits->discard_granularity = data_limits->discard_granularity; 3097 limits->discard_granularity = max(data_limits->discard_granularity,
3098 pool->sectors_per_block << SECTOR_SHIFT);
3098 } else 3099 } else
3099 limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; 3100 limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
3100} 3101}