diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-05-17 08:19:41 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-05-24 04:08:11 -0400 |
commit | 21423fa79119a80e335de0c82ec29f67ed59f1bc (patch) | |
tree | 955e28d450d817d803f2504cb1b38b669c598cc9 /drivers/block/drbd | |
parent | fa7d939663b61f5c2bd3436d3aa126d4c0f47aa8 (diff) |
drbd: Fixed state transitions after async outdate-peer-handler returned
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 03b29f78a37d..9dfe58a09625 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -272,9 +272,22 @@ static int _try_outdate_peer_async(void *data) | |||
272 | { | 272 | { |
273 | struct drbd_conf *mdev = (struct drbd_conf *)data; | 273 | struct drbd_conf *mdev = (struct drbd_conf *)data; |
274 | enum drbd_disk_state nps; | 274 | enum drbd_disk_state nps; |
275 | union drbd_state ns; | ||
275 | 276 | ||
276 | nps = drbd_try_outdate_peer(mdev); | 277 | nps = drbd_try_outdate_peer(mdev); |
277 | drbd_request_state(mdev, NS(pdsk, nps)); | 278 | |
279 | /* Not using | ||
280 | drbd_request_state(mdev, NS(pdsk, nps)); | ||
281 | here, because we might were able to re-establish the connection in the | ||
282 | meantime. | ||
283 | */ | ||
284 | spin_lock_irq(&mdev->req_lock); | ||
285 | ns = mdev->state; | ||
286 | if (ns.conn < C_WF_REPORT_PARAMS) { | ||
287 | ns.pdsk = nps; | ||
288 | _drbd_set_state(mdev, ns, CS_VERBOSE, NULL); | ||
289 | } | ||
290 | spin_unlock_irq(&mdev->req_lock); | ||
278 | 291 | ||
279 | return 0; | 292 | return 0; |
280 | } | 293 | } |