drbd: short-circuit in maybe_pull_ahead
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 20 Mar 2014 13:04:35 +0000 (14:04 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 10 Jul 2014 16:35:02 +0000 (18:35 +0200)
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>
drivers/block/drbd/drbd_req.c

index f07a724998ea021feaf420cb728ee0a8453cb58b..3824d5c737e6914dcaf14c87c4ba53ba7c8f553f 100644 (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.
This page took 0.02509 seconds and 5 git commands to generate.