[3.13.y.z extended stable] Patch "dm cache: always split discards on cache block boundaries" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Tue Jun 17 21:42:38 UTC 2014


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

    dm cache: always split discards on cache block boundaries

to the linux-3.13.y-queue branch of the 3.13.y.z 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.4.

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.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 4278960dc9b914125d2833c895c87b69e47ab61b Mon Sep 17 00:00:00 2001
From: Heinz Mauelshagen <heinzm at redhat.com>
Date: Fri, 23 May 2014 14:10:01 -0400
Subject: dm cache: always split discards on cache block boundaries

commit f1daa838e861ae1a0fb7cd9721a21258430fcc8c upstream.

The DM cache target cannot cope with discards that span multiple cache
blocks, so each discard bio that spans more than one cache block must
get split by the DM core.

Signed-off-by: Heinz Mauelshagen <heinzm at redhat.com>
Acked-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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 1d30f65..fd92101 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2184,6 +2184,8 @@ static int cache_create(struct cache_args *ca, struct cache **result)
 	ti->num_discard_bios = 1;
 	ti->discards_supported = true;
 	ti->discard_zeroes_data_unsupported = true;
+	/* Discard bios must be split on a block boundary */
+	ti->split_discard_bios = true;

 	cache->features = ca->features;
 	ti->per_bio_data_size = get_per_bio_data_size(cache);
--
1.9.1





More information about the kernel-team mailing list