summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2014-03-20 14:04:35 +0100
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-07-10 18:35:02 +0200
commit0c066bc39e56a60785b32d6e43aa6659fb3793ab (patch)
tree770eb7ceaccce2c4e8c4689ef690b10641e28217 /drivers/block/drbd
parent08d0dabf48ccf55e310b8ae9381858b477cabe2e (diff)
downloadlinux-0c066bc39e56a60785b32d6e43aa6659fb3793ab.tar.bz2
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>
Diffstat (limited to 'drivers/block/drbd')
-rw-r--r--drivers/block/drbd/drbd_req.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index f07a724998ea..3824d5c737e6 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -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.