]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.0.79/drbd-fix-for-deadlock-when-using-automatic-split-brain-recovery.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.0.79 / drbd-fix-for-deadlock-when-using-automatic-split-brain-recovery.patch
CommitLineData
5aa83623
GKH
1From 7c689e63a847316c1b2500f86891b0a574ce7e69 Mon Sep 17 00:00:00 2001
2From: Philipp Reisner <philipp.reisner@linbit.com>
3Date: Wed, 27 Mar 2013 14:08:47 +0100
4Subject: drbd: fix for deadlock when using automatic split-brain-recovery
5
6From: Philipp Reisner <philipp.reisner@linbit.com>
7
8commit 7c689e63a847316c1b2500f86891b0a574ce7e69 upstream.
9
10With an automatic after split-brain recovery policy of
11"after-sb-1pri call-pri-lost-after-sb",
12when trying to drbd_set_role() to R_SECONDARY,
13we run into a deadlock.
14
15This was first recognized and supposedly fixed by
162009-06-10 "Fixed a deadlock when using automatic split brain recovery when both nodes are"
17replacing drbd_set_role() with drbd_change_state() in that code-path,
18but the first hunk of that patch forgets to remove the drbd_set_role().
19
20We apparently only ever tested the "two primaries" case.
21
22Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
23Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
24Signed-off-by: Jens Axboe <axboe@kernel.dk>
25Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
26Signed-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. */