aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-02-07 08:49:19 -0500
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-09-28 04:26:58 -0400
commit0625ac190d222fd0855bad79e93f1556fc45dd20 (patch)
tree3c2727aeae2792ca6877b8d1922a7d5d1b9f27ca /drivers
parent808e37b803958e09494e0c7de492386845060057 (diff)
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_int.h12
-rw-r--r--drivers/block/drbd/drbd_main.c2
-rw-r--r--drivers/block/drbd/drbd_nl.c2
-rw-r--r--drivers/block/drbd/drbd_receiver.c2
-rw-r--r--drivers/block/drbd/drbd_worker.c4
5 files changed, 11 insertions, 11 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 33882c82b1ac..0b2962c623a8 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -1858,16 +1858,16 @@ drbd_queue_work(struct drbd_work_queue *q, struct drbd_work *w)
1858 spin_unlock_irqrestore(&q->q_lock, flags); 1858 spin_unlock_irqrestore(&q->q_lock, flags);
1859} 1859}
1860 1860
1861static inline void wake_asender(struct drbd_conf *mdev) 1861static inline void wake_asender(struct drbd_tconn *tconn)
1862{ 1862{
1863 if (test_bit(SIGNAL_ASENDER, &mdev->tconn->flags)) 1863 if (test_bit(SIGNAL_ASENDER, &tconn->flags))
1864 force_sig(DRBD_SIG, mdev->tconn->asender.task); 1864 force_sig(DRBD_SIG, tconn->asender.task);
1865} 1865}
1866 1866
1867static inline void request_ping(struct drbd_conf *mdev) 1867static inline void request_ping(struct drbd_tconn *tconn)
1868{ 1868{
1869 set_bit(SEND_PING, &mdev->tconn->flags); 1869 set_bit(SEND_PING, &tconn->flags);
1870 wake_asender(mdev); 1870 wake_asender(tconn);
1871} 1871}
1872 1872
1873static inline int drbd_send_short_cmd(struct drbd_conf *mdev, 1873static 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 8b443c8b13b3..899bbb1c9865 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1348,7 +1348,7 @@ static int we_should_drop_the_connection(struct drbd_conf *mdev, struct socket *
1348 if (!drop_it) { 1348 if (!drop_it) {
1349 dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n", 1349 dev_err(DEV, "[%s/%d] sock_sendmsg time expired, ko = %u\n",
1350 current->comm, current->pid, mdev->tconn->ko_count); 1350 current->comm, current->pid, mdev->tconn->ko_count);
1351 request_ping(mdev); 1351 request_ping(mdev->tconn);
1352 } 1352 }
1353 1353
1354 return drop_it; /* && (mdev->state == R_PRIMARY) */; 1354 return drop_it; /* && (mdev->state == R_PRIMARY) */;
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index fda399ace8dd..df36a573cd47 100644
--- a/drivers/block/drbd/drbd_nl.c
+++ b/drivers/block/drbd/drbd_nl.c
@@ -318,7 +318,7 @@ drbd_set_role(struct drbd_conf *mdev, enum drbd_role new_role, int force)
318 enum drbd_disk_state nps; 318 enum drbd_disk_state nps;
319 319
320 if (new_role == R_PRIMARY) 320 if (new_role == R_PRIMARY)
321 request_ping(mdev); /* Detect a dead peer ASAP */ 321 request_ping(mdev->tconn); /* Detect a dead peer ASAP */
322 322
323 mutex_lock(&mdev->state_mutex); 323 mutex_lock(&mdev->state_mutex);
324 324
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index b4c357e4ad82..a5234f99de02 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1864,7 +1864,7 @@ static int receive_Data(struct drbd_conf *mdev, enum drbd_packet cmd,
1864 * but I don't like the receiver using the msock */ 1864 * but I don't like the receiver using the msock */
1865 1865
1866 put_ldev(mdev); 1866 put_ldev(mdev);
1867 wake_asender(mdev); 1867 wake_asender(mdev->tconn);
1868 finish_wait(&mdev->misc_wait, &wait); 1868 finish_wait(&mdev->misc_wait, &wait);
1869 return true; 1869 return true;
1870 } 1870 }
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c
index a705979c71f8..5be179ba0c76 100644
--- a/drivers/block/drbd/drbd_worker.c
+++ b/drivers/block/drbd/drbd_worker.c
@@ -145,7 +145,7 @@ static void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req) __rel
145 if (do_al_complete_io) 145 if (do_al_complete_io)
146 drbd_al_complete_io(mdev, e_sector); 146 drbd_al_complete_io(mdev, e_sector);
147 147
148 wake_asender(mdev); 148 wake_asender(mdev->tconn);
149 put_ldev(mdev); 149 put_ldev(mdev);
150} 150}
151 151
@@ -728,7 +728,7 @@ static int w_resync_finished(struct drbd_conf *mdev, struct drbd_work *w, int ca
728static void ping_peer(struct drbd_conf *mdev) 728static void ping_peer(struct drbd_conf *mdev)
729{ 729{
730 clear_bit(GOT_PING_ACK, &mdev->flags); 730 clear_bit(GOT_PING_ACK, &mdev->flags);
731 request_ping(mdev); 731 request_ping(mdev->tconn);
732 wait_event(mdev->misc_wait, 732 wait_event(mdev->misc_wait,
733 test_bit(GOT_PING_ACK, &mdev->flags) || mdev->state.conn < C_CONNECTED); 733 test_bit(GOT_PING_ACK, &mdev->flags) || mdev->state.conn < C_CONNECTED);
734} 734}