This is a note to let you know that I've just added the patch titled
dm thin: re-establish read-only state when switching to fail mode
to the 3.12-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-re-establish-read-only-state-when-switching-to-fail-mode.patch
and it can be found in the queue-3.12 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 5383ef3a929a1366e2ced45cd6d74be7aa2a2281 Mon Sep 17 00:00:00 2001
From: Joe Thornber <[email protected]>
Date: Wed, 4 Dec 2013 16:30:01 -0500
Subject: dm thin: re-establish read-only state when switching to fail mode
From: Joe Thornber <[email protected]>
commit 5383ef3a929a1366e2ced45cd6d74be7aa2a2281 upstream.
If the thin-pool transitioned to fail mode and the thin-pool's table
were reloaded for some reason: the new table's default pool mode would
be read-write, though it will transition to fail mode during resume.
When the pool mode transitions directly from PM_WRITE to PM_FAIL we need
to re-establish the intermediate read-only state in both the metadata
and persistent-data block manager (as is usually done with the normal
pool mode transition sequence: PM_WRITE -> PM_READ_ONLY -> PM_FAIL).
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-thin.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1400,6 +1400,7 @@ static void set_pool_mode(struct pool *p
case PM_FAIL:
DMERR("%s: switching pool to failure mode",
dm_device_name(pool->pool_md));
+ dm_pool_metadata_read_only(pool->pmd);
pool->process_bio = process_bio_fail;
pool->process_discard = process_bio_fail;
pool->process_prepared_mapping = process_prepared_mapping_fail;
Patches currently in stable-queue which might be from [email protected] are
queue-3.12/dm-array-fix-a-reference-counting-bug-in-shadow_ablock.patch
queue-3.12/dm-thin-always-fallback-the-pool-mode-if-commit-fails.patch
queue-3.12/dm-thin-allow-pool-in-read-only-mode-to-transition-to-read-write-mode.patch
queue-3.12/dm-space-map-metadata-return-on-failure-in-sm_metadata_new_block.patch
queue-3.12/dm-thin-re-establish-read-only-state-when-switching-to-fail-mode.patch
queue-3.12/dm-thin-switch-to-read-only-mode-if-a-mapping-insert-fails.patch
queue-3.12/dm-thin-switch-to-read-only-mode-if-metadata-space-is-exhausted.patch
queue-3.12/dm-space-map-disallow-decrementing-a-reference-count-below-zero.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