aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_receiver.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-02-07 11:27:47 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-09-28 04:32:56 -0400
commitce24385342d21bd22c95d2f7162f71df313d0dea (patch)
treef73c27b7366f1a2417756b23d56c0332e84f8280 /drivers/block/drbd/drbd_receiver.c
parent77351055b5244a3131bd8564dccc8bd95a995317 (diff)
drbd: Converted decode_header() 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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 380d24e8434b..7d210548a98e 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -930,7 +930,7 @@ out_release_sockets:
930 return -1; 930 return -1;
931} 931}
932 932
933static bool decode_header(struct drbd_conf *mdev, struct p_header *h, struct packet_info *pi) 933static bool decode_header(struct drbd_tconn *tconn, struct p_header *h, struct packet_info *pi)
934{ 934{
935 if (h->h80.magic == cpu_to_be32(DRBD_MAGIC)) { 935 if (h->h80.magic == cpu_to_be32(DRBD_MAGIC)) {
936 pi->cmd = be16_to_cpu(h->h80.command); 936 pi->cmd = be16_to_cpu(h->h80.command);
@@ -940,7 +940,7 @@ static bool decode_header(struct drbd_conf *mdev, struct p_header *h, struct pac
940 pi->size = be32_to_cpu(h->h95.length) & 0x00ffffff; 940 pi->size = be32_to_cpu(h->h95.length) & 0x00ffffff;
941 pi->vnr = 0; 941 pi->vnr = 0;
942 } else { 942 } else {
943 dev_err(DEV, "magic?? on data m: 0x%08x c: %d l: %d\n", 943 conn_err(tconn, "magic?? on data m: 0x%08x c: %d l: %d\n",
944 be32_to_cpu(h->h80.magic), 944 be32_to_cpu(h->h80.magic),
945 be16_to_cpu(h->h80.command), 945 be16_to_cpu(h->h80.command),
946 be16_to_cpu(h->h80.length)); 946 be16_to_cpu(h->h80.length));
@@ -961,7 +961,7 @@ static int drbd_recv_header(struct drbd_conf *mdev, struct packet_info *pi)
961 return false; 961 return false;
962 } 962 }
963 963
964 r = decode_header(mdev, h, pi); 964 r = decode_header(mdev->tconn, h, pi);
965 mdev->tconn->last_received = jiffies; 965 mdev->tconn->last_received = jiffies;
966 966
967 return r; 967 return r;
@@ -4645,7 +4645,7 @@ int drbd_asender(struct drbd_thread *thi)
4645 } 4645 }
4646 4646
4647 if (received == expect && cmd == NULL) { 4647 if (received == expect && cmd == NULL) {
4648 if (!decode_header(mdev, h, &pi)) 4648 if (!decode_header(mdev->tconn, h, &pi))
4649 goto reconnect; 4649 goto reconnect;
4650 cmd = get_asender_cmd(pi.cmd); 4650 cmd = get_asender_cmd(pi.cmd);
4651 if (unlikely(cmd == NULL)) { 4651 if (unlikely(cmd == NULL)) {