]>
Commit | Line | Data |
---|---|---|
5aa83623 GKH |
1 | From 7c689e63a847316c1b2500f86891b0a574ce7e69 Mon Sep 17 00:00:00 2001 |
2 | From: Philipp Reisner <philipp.reisner@linbit.com> | |
3 | Date: Wed, 27 Mar 2013 14:08:47 +0100 | |
4 | Subject: drbd: fix for deadlock when using automatic split-brain-recovery | |
5 | ||
6 | From: Philipp Reisner <philipp.reisner@linbit.com> | |
7 | ||
8 | commit 7c689e63a847316c1b2500f86891b0a574ce7e69 upstream. | |
9 | ||
10 | With an automatic after split-brain recovery policy of | |
11 | "after-sb-1pri call-pri-lost-after-sb", | |
12 | when trying to drbd_set_role() to R_SECONDARY, | |
13 | we run into a deadlock. | |
14 | ||
15 | This was first recognized and supposedly fixed by | |
16 | 2009-06-10 "Fixed a deadlock when using automatic split brain recovery when both nodes are" | |
17 | replacing drbd_set_role() with drbd_change_state() in that code-path, | |
18 | but the first hunk of that patch forgets to remove the drbd_set_role(). | |
19 | ||
20 | We apparently only ever tested the "two primaries" case. | |
21 | ||
22 | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> | |
23 | Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> | |
24 | Signed-off-by: Jens Axboe <axboe@kernel.dk> | |
25 | Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com> | |
26 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
27 | ||
28 | --- | |
29 | drivers/block/drbd/drbd_receiver.c | 1 - | |
30 | 1 file changed, 1 deletion(-) | |
31 | ||
32 | --- a/drivers/block/drbd/drbd_receiver.c | |
33 | +++ b/drivers/block/drbd/drbd_receiver.c | |
34 | @@ -2225,7 +2225,6 @@ static int drbd_asb_recover_1p(struct dr | |
35 | if (hg == -1 && mdev->state.role == R_PRIMARY) { | |
36 | enum drbd_state_rv rv2; | |
37 | ||
38 | - drbd_set_role(mdev, R_SECONDARY, 0); | |
39 | /* drbd_change_state() does not sleep while in SS_IN_TRANSIENT_STATE, | |
40 | * we might be here in C_WF_REPORT_PARAMS which is transient. | |
41 | * we do not need to wait for the after state change work either. */ |