1
0
Fork 0

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: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
hifive-unleashed-5.1
Lars Ellenberg 2014-03-20 14:04:35 +01:00 committed by Philipp Reisner
parent 08d0dabf48
commit 0c066bc39e
1 changed files with 3 additions and 0 deletions

View File

@ -899,6 +899,9 @@ static void maybe_pull_ahead(struct drbd_device *device)
connection->agreed_pro_version < 96)
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
* to pull ahead of the peer. We also need the local reference to make
* sure device->act_log is there.