Commit 4d641dd7 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Converted drbdd_init() from mdev to tconn

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent f1b3a6ec
...@@ -4226,33 +4226,33 @@ static int drbd_do_auth(struct drbd_tconn *tconn) ...@@ -4226,33 +4226,33 @@ static int drbd_do_auth(struct drbd_tconn *tconn)
int drbdd_init(struct drbd_thread *thi) int drbdd_init(struct drbd_thread *thi)
{ {
struct drbd_conf *mdev = thi->mdev; struct drbd_tconn *tconn = thi->mdev->tconn;
int h; int h;
dev_info(DEV, "receiver (re)started\n"); conn_info(tconn, "receiver (re)started\n");
do { do {
h = drbd_connect(mdev->tconn); h = drbd_connect(tconn);
if (h == 0) { if (h == 0) {
drbd_disconnect(mdev->tconn); drbd_disconnect(tconn);
schedule_timeout_interruptible(HZ); schedule_timeout_interruptible(HZ);
} }
if (h == -1) { if (h == -1) {
dev_warn(DEV, "Discarding network configuration.\n"); conn_warn(tconn, "Discarding network configuration.\n");
drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); drbd_force_state(tconn->volume0, NS(conn, C_DISCONNECTING));
} }
} while (h == 0); } while (h == 0);
if (h > 0) { if (h > 0) {
if (get_net_conf(mdev->tconn)) { if (get_net_conf(tconn)) {
drbdd(mdev->tconn); drbdd(tconn);
put_net_conf(mdev->tconn); put_net_conf(tconn);
} }
} }
drbd_disconnect(mdev->tconn); drbd_disconnect(tconn);
dev_info(DEV, "receiver terminated\n"); conn_info(tconn, "receiver terminated\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment