[3.13.y-ckt stable] Patch "dm cache: only use overwrite optimisation for promotion when in writeback mode" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Wed Jan 28 22:19:55 UTC 2015


This is a note to let you know that I have just added a patch titled

    dm cache: only use overwrite optimisation for promotion when in writeback mode

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt15.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From f82f71e6d53e369f85a6078979c0610424bc6f95 Mon Sep 17 00:00:00 2001
From: Joe Thornber <ejt at redhat.com>
Date: Thu, 27 Nov 2014 12:21:08 +0000
Subject: dm cache: only use overwrite optimisation for promotion when in
 writeback mode

commit f29a3147e251d7ae20d3194ff67f109d71e501b4 upstream.

Overwrite causes the cache block and origin blocks to diverge, which
is only allowed in writeback mode.

Signed-off-by: Joe Thornber <ejt at redhat.com>
Signed-off-by: Mike Snitzer <snitzer at redhat.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 drivers/md/dm-cache-target.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 99474ef..b943ef1 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -1049,7 +1049,8 @@ static void issue_copy(struct dm_cache_migration *mg)

 		avoid = is_discarded_oblock(cache, mg->new_oblock);

-		if (!avoid && bio_writes_complete_block(cache, bio)) {
+		if (writeback_mode(&cache->features) &&
+		    !avoid && bio_writes_complete_block(cache, bio)) {
 			issue_overwrite(mg, bio);
 			return;
 		}
--
1.9.1





More information about the kernel-team mailing list