Skip to content

Commit

Permalink
drbd: Killed an assert that is no longer valid
Browse files Browse the repository at this point in the history
The point is that drbd_disconnect() can be called with a cstate of
WFConnection.

That happens if the user issues "drbdsetup disconnect" while the
drbd_connect() function executes. Then drbdd_init() will call
drbdd(), which in turn will return without receiving any
packets. Then drbdd_init() will end up calling drbd_disconnect()
with a cstate of WFConnection.

Bottom line: This assertion is wrong as it is, and we do not
see value in fixing it. => Removing it.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Philipp Reisner committed Mar 10, 2011
1 parent 148efa1 commit 94f2b05
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3763,9 +3763,6 @@ static void drbd_disconnect(struct drbd_conf *mdev)

if (mdev->state.conn == C_STANDALONE)
return;
if (mdev->state.conn >= C_WF_CONNECTION)
dev_err(DEV, "ASSERT FAILED cstate = %s, expected < WFConnection\n",
drbd_conn_str(mdev->state.conn));

/* asender does not clean up anything. it must not interfere, either */
drbd_thread_stop(&mdev->asender);
Expand Down

0 comments on commit 94f2b05

Please sign in to comment.