diff options
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 3897b90bd462..63903a5a5d9e 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c | |||
@@ -2432,6 +2432,7 @@ static void set_pool_mode(struct pool *pool, enum pool_mode new_mode) | |||
2432 | case PM_WRITE: | 2432 | case PM_WRITE: |
2433 | if (old_mode != new_mode) | 2433 | if (old_mode != new_mode) |
2434 | notify_of_pool_mode_change(pool, "write"); | 2434 | notify_of_pool_mode_change(pool, "write"); |
2435 | pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space; | ||
2435 | dm_pool_metadata_read_write(pool->pmd); | 2436 | dm_pool_metadata_read_write(pool->pmd); |
2436 | pool->process_bio = process_bio; | 2437 | pool->process_bio = process_bio; |
2437 | pool->process_discard = process_discard_bio; | 2438 | pool->process_discard = process_discard_bio; |
@@ -4249,10 +4250,9 @@ static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits) | |||
4249 | { | 4250 | { |
4250 | struct thin_c *tc = ti->private; | 4251 | struct thin_c *tc = ti->private; |
4251 | struct pool *pool = tc->pool; | 4252 | struct pool *pool = tc->pool; |
4252 | struct queue_limits *pool_limits = dm_get_queue_limits(pool->pool_md); | ||
4253 | 4253 | ||
4254 | if (!pool_limits->discard_granularity) | 4254 | if (!pool->pf.discard_enabled) |
4255 | return; /* pool's discard support is disabled */ | 4255 | return; |
4256 | 4256 | ||
4257 | limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; | 4257 | limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; |
4258 | limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */ | 4258 | limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */ |