Commit e43ef195 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Moved SEND_PING to the per connection (tconn) flags

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 25703f83
...@@ -758,7 +758,6 @@ enum { ...@@ -758,7 +758,6 @@ enum {
enum { enum {
CREATE_BARRIER, /* next P_DATA is preceded by a P_BARRIER */ CREATE_BARRIER, /* next P_DATA is preceded by a P_BARRIER */
SIGNAL_ASENDER, /* whether asender wants to be interrupted */ SIGNAL_ASENDER, /* whether asender wants to be interrupted */
SEND_PING, /* whether asender should send a ping asap */
UNPLUG_QUEUED, /* only relevant with kernel 2.4 */ UNPLUG_QUEUED, /* only relevant with kernel 2.4 */
UNPLUG_REMOTE, /* sending a "UnplugRemote" could help */ UNPLUG_REMOTE, /* sending a "UnplugRemote" could help */
...@@ -911,6 +910,7 @@ struct fifo_buffer { ...@@ -911,6 +910,7 @@ struct fifo_buffer {
enum { enum {
NET_CONGESTED, /* The data socket is congested */ NET_CONGESTED, /* The data socket is congested */
DISCARD_CONCURRENT, /* Set on one node, cleared on the peer! */ DISCARD_CONCURRENT, /* Set on one node, cleared on the peer! */
SEND_PING, /* whether asender should send a ping asap */
}; };
struct drbd_tconn { /* is a resource from the config file */ struct drbd_tconn { /* is a resource from the config file */
...@@ -1867,7 +1867,7 @@ static inline void wake_asender(struct drbd_conf *mdev) ...@@ -1867,7 +1867,7 @@ static inline void wake_asender(struct drbd_conf *mdev)
static inline void request_ping(struct drbd_conf *mdev) static inline void request_ping(struct drbd_conf *mdev)
{ {
set_bit(SEND_PING, &mdev->flags); set_bit(SEND_PING, &mdev->tconn->flags);
wake_asender(mdev); wake_asender(mdev);
} }
......
...@@ -4564,7 +4564,7 @@ int drbd_asender(struct drbd_thread *thi) ...@@ -4564,7 +4564,7 @@ int drbd_asender(struct drbd_thread *thi)
while (get_t_state(thi) == RUNNING) { while (get_t_state(thi) == RUNNING) {
drbd_thread_current_set_cpu(mdev, thi); drbd_thread_current_set_cpu(mdev, thi);
if (test_and_clear_bit(SEND_PING, &mdev->flags)) { if (test_and_clear_bit(SEND_PING, &mdev->tconn->flags)) {
if (!drbd_send_ping(mdev)) { if (!drbd_send_ping(mdev)) {
dev_err(DEV, "drbd_send_ping has failed\n"); dev_err(DEV, "drbd_send_ping has failed\n");
goto reconnect; goto reconnect;
...@@ -4635,7 +4635,7 @@ int drbd_asender(struct drbd_thread *thi) ...@@ -4635,7 +4635,7 @@ int drbd_asender(struct drbd_thread *thi)
dev_err(DEV, "PingAck did not arrive in time.\n"); dev_err(DEV, "PingAck did not arrive in time.\n");
goto reconnect; goto reconnect;
} }
set_bit(SEND_PING, &mdev->flags); set_bit(SEND_PING, &mdev->tconn->flags);
continue; continue;
} else if (rv == -EINTR) { } else if (rv == -EINTR) {
continue; continue;
......
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