mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-14 09:47:20 +00:00
drbd: don't pointlessly queue bitmap send, if we lost connection
This is a minor optimization and cleanup, and also considerably reduces some harmless (but noisy) race with the connection cleanup code. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
194bfb32db
commit
54b956abef
@ -1428,8 +1428,13 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
|
|||||||
drbd_send_uuids(mdev);
|
drbd_send_uuids(mdev);
|
||||||
drbd_send_state(mdev);
|
drbd_send_state(mdev);
|
||||||
}
|
}
|
||||||
if (os.conn != C_WF_BITMAP_S && ns.conn == C_WF_BITMAP_S)
|
/* No point in queuing send_bitmap if we don't have a connection
|
||||||
drbd_queue_bitmap_io(mdev, &drbd_send_bitmap, NULL, "send_bitmap (WFBitMapS)");
|
* anymore, so check also the _current_ state, not only the new state
|
||||||
|
* at the time this work was queued. */
|
||||||
|
if (os.conn != C_WF_BITMAP_S && ns.conn == C_WF_BITMAP_S &&
|
||||||
|
mdev->state.conn == C_WF_BITMAP_S)
|
||||||
|
drbd_queue_bitmap_io(mdev, &drbd_send_bitmap, NULL,
|
||||||
|
"send_bitmap (WFBitMapS)");
|
||||||
|
|
||||||
/* Lost contact to peer's copy of the data */
|
/* Lost contact to peer's copy of the data */
|
||||||
if ((os.pdsk >= D_INCONSISTENT &&
|
if ((os.pdsk >= D_INCONSISTENT &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user