Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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.