drbd: Converted wake_asender() and request_ping() from mdev to tconn
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 33882c8..0b2962c 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1858,16 +1858,16 @@
spin_unlock_irqrestore(&q->q_lock, flags);
}
-static inline void wake_asender(struct drbd_conf *mdev)
+static inline void wake_asender(struct drbd_tconn *tconn)
{
- if (test_bit(SIGNAL_ASENDER, &mdev->tconn->flags))
- force_sig(DRBD_SIG, mdev->tconn->asender.task);
+ if (test_bit(SIGNAL_ASENDER, &tconn->flags))
+ force_sig(DRBD_SIG, tconn->asender.task);
}
-static inline void request_ping(struct drbd_conf *mdev)
+static inline void request_ping(struct drbd_tconn *tconn)
{
- set_bit(SEND_PING, &mdev->tconn->flags);
- wake_asender(mdev);
+ set_bit(SEND_PING, &tconn->flags);
+ wake_asender(tconn);
}
static inline int drbd_send_short_cmd(struct drbd_conf *mdev,
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 8b443c8..899bbb1 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1348,7 +1348,7 @@
if (!drop_it) {
dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n",
current->comm, current->pid, mdev->tconn->ko_count);
- request_ping(mdev);
+ request_ping(mdev->tconn);
}
return drop_it; /* && (mdev->state == R_PRIMARY) */;
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fda399a..df36a57 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -318,7 +318,7 @@
enum drbd_disk_state nps;
if (new_role == R_PRIMARY)
- request_ping(mdev); /* Detect a dead peer ASAP */
+ request_ping(mdev->tconn); /* Detect a dead peer ASAP */
mutex_lock(&mdev->state_mutex);
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index b4c357e..a5234f9 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1864,7 +1864,7 @@
* but I don't like the receiver using the msock */
put_ldev(mdev);
- wake_asender(mdev);
+ wake_asender(mdev->tconn);
finish_wait(&mdev->misc_wait, &wait);
return true;
}
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index a705979..5be179b 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -145,7 +145,7 @@
if (do_al_complete_io)
drbd_al_complete_io(mdev, e_sector);
- wake_asender(mdev);
+ wake_asender(mdev->tconn);
put_ldev(mdev);
}
@@ -728,7 +728,7 @@
static void ping_peer(struct drbd_conf *mdev)
{
clear_bit(GOT_PING_ACK, &mdev->flags);
- request_ping(mdev);
+ request_ping(mdev->tconn);
wait_event(mdev->misc_wait,
test_bit(GOT_PING_ACK, &mdev->flags) || mdev->state.conn < C_CONNECTED);
}