return true;
}
-static int drbd_recv_header(struct drbd_conf *mdev, struct packet_info *pi)
+static int drbd_recv_header(struct drbd_tconn *tconn, struct packet_info *pi)
{
- struct p_header *h = &mdev->tconn->data.rbuf.header;
+ struct p_header *h = &tconn->data.rbuf.header;
int r;
- r = drbd_recv(mdev->tconn, h, sizeof(*h));
+ r = drbd_recv(tconn, h, sizeof(*h));
if (unlikely(r != sizeof(*h))) {
if (!signal_pending(current))
- dev_warn(DEV, "short read expecting header on sock: r=%d\n", r);
+ conn_warn(tconn, "short read expecting header on sock: r=%d\n", r);
return false;
}
- r = decode_header(mdev->tconn, h, pi);
- mdev->tconn->last_received = jiffies;
+ r = decode_header(tconn, h, pi);
+ tconn->last_received = jiffies;
return r;
}
goto out;
break;
}
- if (!drbd_recv_header(mdev, &pi))
+ if (!drbd_recv_header(mdev->tconn, &pi))
goto out;
cmd = pi.cmd;
data_size = pi.size;
while (get_t_state(&mdev->tconn->receiver) == RUNNING) {
drbd_thread_current_set_cpu(mdev, &mdev->tconn->receiver);
- if (!drbd_recv_header(mdev, &pi))
+ if (!drbd_recv_header(mdev->tconn, &pi))
goto err_out;
if (unlikely(pi.cmd >= P_MAX_CMD || !drbd_cmd_handler[pi.cmd].function)) {
if (!rv)
return 0;
- rv = drbd_recv_header(mdev, &pi);
+ rv = drbd_recv_header(mdev->tconn, &pi);
if (!rv)
return 0;
if (!rv)
goto fail;
- rv = drbd_recv_header(mdev, &pi);
+ rv = drbd_recv_header(mdev->tconn, &pi);
if (!rv)
goto fail;
if (!rv)
goto fail;
- rv = drbd_recv_header(mdev, &pi);
+ rv = drbd_recv_header(mdev->tconn, &pi);
if (!rv)
goto fail;