summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-thin.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2015-12-17 14:57:46 +0100
committerLinus Walleij <linus.walleij@linaro.org>2015-12-17 14:57:46 +0100
commit4dccc93f1e7f4e2fd92a48c40a7ac9211a029352 (patch)
tree717a183f0dba200a882126cf095f38e319302c51 /drivers/md/dm-thin.c
parentpinctrl: fixup problematic flag (diff)
parentLinux 4.4-rc5 (diff)
downloadlinux-4dccc93f1e7f4e2fd92a48c40a7ac9211a029352.tar.xz
linux-4dccc93f1e7f4e2fd92a48c40a7ac9211a029352.zip
Merge tag 'v4.4-rc5' into devel
Linux 4.4-rc5
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r--drivers/md/dm-thin.c6
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)
case PM_WRITE:
if (old_mode != new_mode)
notify_of_pool_mode_change(pool, "write");
+ pool->pf.error_if_no_space = pt->requested_pf.error_if_no_space;
dm_pool_metadata_read_write(pool->pmd);
pool->process_bio = process_bio;
pool->process_discard = process_discard_bio;
@@ -4249,10 +4250,9 @@ static void thin_io_hints(struct dm_target *ti, struct queue_limits *limits)
{
struct thin_c *tc = ti->private;
struct pool *pool = tc->pool;
- struct queue_limits *pool_limits = dm_get_queue_limits(pool->pool_md);
- if (!pool_limits->discard_granularity)
- return; /* pool's discard support is disabled */
+ if (!pool->pf.discard_enabled)
+ return;
limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */