aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-02-09 08:10:32 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-09-28 04:33:16 -0400
commit2a67d8b93b3363d4a5608d16d510a4bf6b3863fb (patch)
tree1df36bd453029bf29dc5d4dbb97b6212f00736bb /drivers/block/drbd/drbd_receiver.c
parent00d56944ff086f895e9ad184a7785ca1eece4a3b (diff)
drbd: Converted drbd_send_ping() and related functions from mdev to tconn
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_receiver.c')
-rw-r--r--drivers/block/drbd/drbd_receiver.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 02fa1b25dce5..2b69a15a55dd 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -4279,16 +4279,17 @@ static int got_RqSReply(struct drbd_conf *mdev, enum drbd_packet cmd)
4279 4279
4280static int got_Ping(struct drbd_conf *mdev, enum drbd_packet cmd) 4280static int got_Ping(struct drbd_conf *mdev, enum drbd_packet cmd)
4281{ 4281{
4282 return drbd_send_ping_ack(mdev); 4282 return drbd_send_ping_ack(mdev->tconn);
4283 4283
4284} 4284}
4285 4285
4286static int got_PingAck(struct drbd_conf *mdev, enum drbd_packet cmd) 4286static int got_PingAck(struct drbd_conf *mdev, enum drbd_packet cmd)
4287{ 4287{
4288 struct drbd_tconn *tconn = mdev->tconn;
4288 /* restore idle timeout */ 4289 /* restore idle timeout */
4289 mdev->tconn->meta.socket->sk->sk_rcvtimeo = mdev->tconn->net_conf->ping_int*HZ; 4290 tconn->meta.socket->sk->sk_rcvtimeo = tconn->net_conf->ping_int*HZ;
4290 if (!test_and_set_bit(GOT_PING_ACK, &mdev->flags)) 4291 if (!test_and_set_bit(GOT_PING_ACK, &tconn->flags))
4291 wake_up(&mdev->misc_wait); 4292 wake_up(&tconn->ping_wait);
4292 4293
4293 return true; 4294 return true;
4294} 4295}
@@ -4610,7 +4611,7 @@ int drbd_asender(struct drbd_thread *thi)
4610 while (get_t_state(thi) == RUNNING) { 4611 while (get_t_state(thi) == RUNNING) {
4611 drbd_thread_current_set_cpu(thi); 4612 drbd_thread_current_set_cpu(thi);
4612 if (test_and_clear_bit(SEND_PING, &tconn->flags)) { 4613 if (test_and_clear_bit(SEND_PING, &tconn->flags)) {
4613 if (!drbd_send_ping(tconn->volume0)) { 4614 if (!drbd_send_ping(tconn)) {
4614 conn_err(tconn, "drbd_send_ping has failed\n"); 4615 conn_err(tconn, "drbd_send_ping has failed\n");
4615 goto reconnect; 4616 goto reconnect;
4616 } 4617 }