diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2014-03-20 09:04:35 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-07-10 12:35:02 -0400 |
commit | 0c066bc39e56a60785b32d6e43aa6659fb3793ab (patch) | |
tree | 770eb7ceaccce2c4e8c4689ef690b10641e28217 /drivers/block | |
parent | 08d0dabf48ccf55e310b8ae9381858b477cabe2e (diff) |
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')
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 3 |
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) | |||
899 | connection->agreed_pro_version < 96) | 899 | connection->agreed_pro_version < 96) |
900 | return; | 900 | return; |
901 | 901 | ||
902 | if (on_congestion == OC_PULL_AHEAD && device->state.conn == C_AHEAD) | ||
903 | return; /* nothing to do ... */ | ||
904 | |||
902 | /* If I don't even have good local storage, we can not reasonably try | 905 | /* If I don't even have good local storage, we can not reasonably try |
903 | * to pull ahead of the peer. We also need the local reference to make | 906 | * to pull ahead of the peer. We also need the local reference to make |
904 | * sure device->act_log is there. | 907 | * sure device->act_log is there. |