This is a note to let you know that I've just added the patch titled dm thin: fix inability to discard blocks when in out-of-data-space mode to the 3.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: dm-thin-fix-inability-to-discard-blocks-when-in-out-of-data-space-mode.patch and it can be found in the queue-3.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 45ec9bd0fd7abf8705e7cf12205ff69fe9d51181 Mon Sep 17 00:00:00 2001 From: Joe Thornber <ejt@xxxxxxxxxx> Date: Wed, 10 Dec 2014 17:06:57 +0000 Subject: dm thin: fix inability to discard blocks when in out-of-data-space mode From: Joe Thornber <ejt@xxxxxxxxxx> commit 45ec9bd0fd7abf8705e7cf12205ff69fe9d51181 upstream. When the pool was in PM_OUT_OF_SPACE mode its process_prepared_discard function pointer was incorrectly being set to process_prepared_discard_passdown rather than process_prepared_discard. This incorrect function pointer meant the discard was being passed down, but not effecting the mapping. As such any discard that was issued, in an attempt to reclaim blocks, would not successfully free data space. Reported-by: Eric Sandeen <sandeen@xxxxxxxxxx> Signed-off-by: Joe Thornber <ejt@xxxxxxxxxx> Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/md/dm-thin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm-thin.c +++ b/drivers/md/dm-thin.c @@ -1592,7 +1592,7 @@ static void set_pool_mode(struct pool *p pool->process_bio = process_bio_read_only; pool->process_discard = process_discard; pool->process_prepared_mapping = process_prepared_mapping; - pool->process_prepared_discard = process_prepared_discard_passdown; + pool->process_prepared_discard = process_prepared_discard; if (!pool->pf.error_if_no_space && no_space_timeout) queue_delayed_work(pool->wq, &pool->no_space_timeout, no_space_timeout); Patches currently in stable-queue which might be from ejt@xxxxxxxxxx are queue-3.14/dm-space-map-metadata-fix-sm_bootstrap_get_nr_blocks.patch queue-3.14/dm-thin-fix-missing-out-of-data-space-to-write-mode-transition-if-blocks-are-released.patch queue-3.14/dm-thin-fix-inability-to-discard-blocks-when-in-out-of-data-space-mode.patch queue-3.14/dm-cache-only-use-overwrite-optimisation-for-promotion-when-in-writeback-mode.patch queue-3.14/dm-cache-dirty-flag-was-mistakenly-being-cleared-when-promoting-via-overwrite.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html