diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-09-29 12:52:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-09-29 12:52:07 +0200 |
commit | d8dfacf8b50c260d79864933ac82a8198a0908a9 (patch) | |
tree | b172eb8643de7bd9f9439c58031b06c98116d86a /drivers/md/dm-thin.c | |
parent | e87359efcaf45efc41dbaa6ec25eb26705300cee (diff) | |
parent | df075feefbd347f13fba5198294cda619532c237 (diff) | |
download | linux-d8dfacf8b50c260d79864933ac82a8198a0908a9.tar.gz linux-d8dfacf8b50c260d79864933ac82a8198a0908a9.tar.xz |
Merge branch 'topic/firewire-update' into for-next
Diffstat (limited to 'drivers/md/dm-thin.c')
-rw-r--r-- | drivers/md/dm-thin.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c index 6578b7bc1fbb..6fcbfb063366 100644 --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -4249,6 +4249,10 @@ 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 */ limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT; limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */ |