This is a note to let you know that I've just added the patch titled
dm cache: fix spurious cell_defer when dealing with partial block at end of
device
to the 3.17-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-fix-spurious-cell_defer-when-dealing-with-partial-block-at-end-of-device.patch
and it can be found in the queue-3.17 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From f824a2af3dfbbb766c02e19df21f985bceadf0ee Mon Sep 17 00:00:00 2001
From: Joe Thornber <[email protected]>
Date: Fri, 28 Nov 2014 09:48:25 +0000
Subject: dm cache: fix spurious cell_defer when dealing with partial block at
end of device
From: Joe Thornber <[email protected]>
commit f824a2af3dfbbb766c02e19df21f985bceadf0ee upstream.
We never bother caching a partial block that is at the back end of the
origin device. No cell ever gets locked, but the calling code was
assuming it was and trying to release it.
Now the code only releases if the cell has been set to a non NULL
value.
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 | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -2554,11 +2554,11 @@ static int __cache_map(struct cache *cac
static int cache_map(struct dm_target *ti, struct bio *bio)
{
int r;
- struct dm_bio_prison_cell *cell;
+ struct dm_bio_prison_cell *cell = NULL;
struct cache *cache = ti->private;
r = __cache_map(cache, bio, &cell);
- if (r == DM_MAPIO_REMAPPED) {
+ if (r == DM_MAPIO_REMAPPED && cell) {
inc_ds(cache, bio, cell);
cell_defer(cache, cell, false);
}
Patches currently in stable-queue which might be from [email protected] are
queue-3.17/dm-space-map-metadata-fix-sm_bootstrap_get_nr_blocks.patch
queue-3.17/dm-thin-fix-missing-out-of-data-space-to-write-mode-transition-if-blocks-are-released.patch
queue-3.17/dm-cache-fix-spurious-cell_defer-when-dealing-with-partial-block-at-end-of-device.patch
queue-3.17/dm-thin-fix-inability-to-discard-blocks-when-in-out-of-data-space-mode.patch
queue-3.17/dm-cache-only-use-overwrite-optimisation-for-promotion-when-in-writeback-mode.patch
queue-3.17/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