diff options
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 9f0b94fad361..63903a5a5d9e 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
@@ -4250,10 +4250,9 @@ static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits) | |||
4250 | { | 4250 | { |
4251 | struct thin_c *tc = ti->private; | 4251 | struct thin_c *tc = ti->private; |
4252 | struct pool *pool = tc->pool; | 4252 | struct pool *pool = tc->pool; |
4253 | struct queue_limits *pool_limits = dm_get_queue_limits(pool->pool_md); | ||
4254 | 4253 | ||
4255 | if (!pool_limits->discard_granularity) | 4254 | if (!pool->pf.discard_enabled) |
4256 | return; /* pool's discard support is disabled */ | 4255 | return; |
4257 | 4256 | ||
4258 | limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; | 4257 | limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; |
4259 | limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */ | 4258 | limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */ |