]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drbd: Converted got_Ping() and got_PingAck() from mdev to tconn
authorPhilipp Reisner <philipp.reisner@linbit.com>
Wed, 16 Mar 2011 10:21:50 +0000 (11:21 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Sat, 3 Nov 2012 23:16:30 +0000 (00:16 +0100)
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c

index ba350bd562c698b610918d8996f9851961abd1ae..097ca71d1947adbf2fe65e51ea3f2792b2c5dddd 100644 (file)
@@ -4441,15 +4441,14 @@ static int got_RqSReply(struct drbd_conf *mdev, enum drbd_packet cmd)
        return true;
 }
 
-static int got_Ping(struct drbd_conf *mdev, enum drbd_packet cmd)
+static int got_Ping(struct drbd_tconn *tconn, enum drbd_packet cmd)
 {
-       return drbd_send_ping_ack(mdev->tconn);
+       return drbd_send_ping_ack(tconn);
 
 }
 
-static int got_PingAck(struct drbd_conf *mdev, enum drbd_packet cmd)
+static int got_PingAck(struct drbd_tconn *tconn, enum drbd_packet cmd)
 {
-       struct drbd_tconn *tconn = mdev->tconn;
        /* restore idle timeout */
        tconn->meta.socket->sk->sk_rcvtimeo = tconn->net_conf->ping_int*HZ;
        if (!test_and_set_bit(GOT_PING_ACK, &tconn->flags))
@@ -4729,8 +4728,8 @@ struct asender_cmd {
 };
 
 static struct asender_cmd asender_tbl[] = {
-       [P_PING]            = { sizeof(struct p_header), MDEV, { got_Ping } },
-       [P_PING_ACK]        = { sizeof(struct p_header), MDEV, { got_PingAck } },
+       [P_PING]            = { sizeof(struct p_header), CONN, { .conn_fn = got_Ping } },
+       [P_PING_ACK]        = { sizeof(struct p_header), CONN, { .conn_fn = got_PingAck } },
        [P_RECV_ACK]        = { sizeof(struct p_block_ack), MDEV, { got_BlockAck } },
        [P_WRITE_ACK]       = { sizeof(struct p_block_ack), MDEV, { got_BlockAck } },
        [P_RS_WRITE_ACK]    = { sizeof(struct p_block_ack), MDEV, { got_BlockAck } },