This is a note to let you know that I've just added the patch titled
dm cache: dirty flag was mistakenly being cleared when promoting via
overwrite
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-cache-dirty-flag-was-mistakenly-being-cleared-when-promoting-via-overwrite.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 <[email protected]> know about it.
>From 1e32134a5a404e80bfb47fad8a94e9bbfcbdacc5 Mon Sep 17 00:00:00 2001
From: Joe Thornber <[email protected]>
Date: Thu, 27 Nov 2014 12:26:46 +0000
Subject: dm cache: dirty flag was mistakenly being cleared when promoting via
overwrite
From: Joe Thornber <[email protected]>
commit 1e32134a5a404e80bfb47fad8a94e9bbfcbdacc5 upstream.
If the incoming bio is a WRITE and completely covers a block then we
don't bother to do any copying for a promotion operation. Once this is
done the cache block and origin block will be different, so we need to
set it to 'dirty'.
Signed-off-by: Joe Thornber <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/md/dm-cache-target.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -946,10 +946,14 @@ static void migration_success_post_commi
}
} else {
- clear_dirty(cache, mg->new_oblock, mg->cblock);
- if (mg->requeue_holder)
+ if (mg->requeue_holder) {
+ clear_dirty(cache, mg->new_oblock, mg->cblock);
cell_defer(cache, mg->new_ocell, true);
- else {
+ } else {
+ /*
+ * The block was promoted via an overwrite, so it's
dirty.
+ */
+ set_dirty(cache, mg->new_oblock, mg->cblock);
bio_endio(mg->new_ocell->holder, 0);
cell_defer(cache, mg->new_ocell, false);
}
Patches currently in stable-queue which might be from [email protected] 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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html