Commit 0c066bc3 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

drbd: short-circuit in maybe_pull_ahead

If we already "pulled ahead", we can short-circuit,
and avoid logging the same messages over and over again.
Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 08d0dabf
...@@ -899,6 +899,9 @@ static void maybe_pull_ahead(struct drbd_device *device) ...@@ -899,6 +899,9 @@ static void maybe_pull_ahead(struct drbd_device *device)
connection->agreed_pro_version < 96) connection->agreed_pro_version < 96)
return; return;
if (on_congestion == OC_PULL_AHEAD && device->state.conn == C_AHEAD)
return; /* nothing to do ... */
/* If I don't even have good local storage, we can not reasonably try /* If I don't even have good local storage, we can not reasonably try
* to pull ahead of the peer. We also need the local reference to make * to pull ahead of the peer. We also need the local reference to make
* sure device->act_log is there. * sure device->act_log is there.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment