[3.11.y.z extended stable] Patch "dm thin: re-establish read-only state when switching to fail mode" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Wed Dec 18 10:20:32 UTC 2013
This is a note to let you know that I have just added a patch titled
dm thin: re-establish read-only state when switching to fail mode
to the linux-3.11.y-queue branch of the 3.11.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.11.y-queue
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.11.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From 825b8e7742642fd25e17ada1ebc8f021c797481d Mon Sep 17 00:00:00 2001
From: Joe Thornber <ejt at redhat.com>
Date: Wed, 4 Dec 2013 16:30:01 -0500
Subject: dm thin: re-establish read-only state when switching to fail mode
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 <ejt at redhat.com>
Signed-off-by: Mike Snitzer <snitzer at redhat.com>
[ luis: backported to 3.11: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/md/dm-thin.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c
index e36f81e..930a7e3 100644
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -1389,6 +1389,7 @@ static void set_pool_mode(struct pool *pool, enum pool_mode mode)
switch (mode) {
case PM_FAIL:
DMERR("switching pool to failure mode");
+ 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;
--
1.8.3.2
More information about the kernel-team
mailing list