Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251274
b: refs/heads/master
c: f36af18
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed May 24, 2011
1 parent 10563c2 commit cca2754
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53ea433145d9a56c7ad5e69f21f5662053e00e84
refs/heads/master: f36af18c7b4ea1ba333c09b606bb4a7e5af66b4d
10 changes: 8 additions & 2 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4554,6 +4554,7 @@ int drbd_asender(struct drbd_thread *thi)
int received = 0;
int expect = sizeof(struct p_header80);
int empty;
int ping_timeout_active = 0;

sprintf(current->comm, "drbd%d_asender", mdev_to_minor(mdev));

Expand All @@ -4566,6 +4567,7 @@ int drbd_asender(struct drbd_thread *thi)
ERR_IF(!drbd_send_ping(mdev)) goto reconnect;
mdev->meta.socket->sk->sk_rcvtimeo =
mdev->net_conf->ping_timeo*HZ/10;
ping_timeout_active = 1;
}

/* conditionally cork;
Expand Down Expand Up @@ -4620,8 +4622,7 @@ int drbd_asender(struct drbd_thread *thi)
dev_err(DEV, "meta connection shut down by peer.\n");
goto reconnect;
} else if (rv == -EAGAIN) {
if (mdev->meta.socket->sk->sk_rcvtimeo ==
mdev->net_conf->ping_timeo*HZ/10) {
if (ping_timeout_active) {
dev_err(DEV, "PingAck did not arrive in time.\n");
goto reconnect;
}
Expand Down Expand Up @@ -4660,6 +4661,11 @@ int drbd_asender(struct drbd_thread *thi)
if (!cmd->process(mdev, h))
goto reconnect;

/* the idle_timeout (ping-int)
* has been restored in got_PingAck() */
if (cmd == get_asender_cmd(P_PING_ACK))
ping_timeout_active = 0;

buf = h;
received = 0;
expect = sizeof(struct p_header80);
Expand Down

0 comments on commit cca2754

Please sign in to comment.