diff options
author | Lars Ellenberg <lars.ellenberg@linbit.com> | 2011-11-14 15:42:37 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-08 16:58:34 +0100 |
commit | d5b27b01f17ef1f0badc45f9eea521be3457c9cb (patch) | |
tree | e0760531801c0b5b51ea8b3f05f9c0c5d85ff60e /drivers/block/drbd/drbd_worker.c | |
parent | 8c0785a5c9a0f2472aff68dc32247be01728c416 (diff) |
drbd: move the drbd_work_queue from drbd_socket to drbd_connection
cherry-picked and adapted from drbd 9 devel branch
In 8.4, we don't distinguish between "resource work" and "connection
work" yet, we have one worker for both, as we still have only one connection.
We only ever used the "data.work",
no need to keep the "meta.work" around.
Move tconn->data.work to tconn->sender_work.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index fb2e6c8d45c..39ece3a2f53 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -109,7 +109,7 @@ void drbd_endio_read_sec_final(struct drbd_peer_request *peer_req) __releases(lo __drbd_chk_io_error(mdev, false); spin_unlock_irqrestore(&mdev->tconn->req_lock, flags); - drbd_queue_work(&mdev->tconn->data.work, &peer_req->w); + drbd_queue_work(&mdev->tconn->sender_work, &peer_req->w); put_ldev(mdev); } @@ -401,7 +401,7 @@ void resync_timer_fn(unsigned long data) struct drbd_conf *mdev = (struct drbd_conf *) data; if (list_empty(&mdev->resync_work.list)) - drbd_queue_work(&mdev->tconn->data.work, &mdev->resync_work); + drbd_queue_work(&mdev->tconn->sender_work, &mdev->resync_work); } static void fifo_set(struct fifo_buffer *fb, int value) @@ -783,7 +783,7 @@ int drbd_resync_finished(struct drbd_conf *mdev) if (w) { w->cb = w_resync_finished; w->mdev = mdev; - drbd_queue_work(&mdev->tconn->data.work, w); + drbd_queue_work(&mdev->tconn->sender_work, w); return 1; } dev_err(DEV, "Warn failed to drbd_rs_del_all() and to kmalloc(w).\n"); @@ -1484,7 +1484,7 @@ void start_resync_timer_fn(unsigned long data) { struct drbd_conf *mdev = (struct drbd_conf *) data; - drbd_queue_work(&mdev->tconn->data.work, &mdev->start_resync_work); + drbd_queue_work(&mdev->tconn->sender_work, &mdev->start_resync_work); } int w_start_resync(struct drbd_work *w, int cancel) @@ -1706,7 +1706,7 @@ int drbd_worker(struct drbd_thread *thi) /* as long as we use drbd_queue_work_front(), * we may only dequeue single work items here, not batches. */ if (list_empty(&work_list)) - dequeue_work_item(&tconn->data.work, &work_list); + dequeue_work_item(&tconn->sender_work, &work_list); /* Still nothing to do? Poke TCP, just in case, * then wait for new work (or signal). */ @@ -1721,8 +1721,8 @@ int drbd_worker(struct drbd_thread *thi) drbd_tcp_uncork(tconn->data.socket); mutex_unlock(&tconn->data.mutex); - wait_event_interruptible(tconn->data.work.q_wait, - dequeue_work_item(&tconn->data.work, &work_list)); + wait_event_interruptible(tconn->sender_work.q_wait, + dequeue_work_item(&tconn->sender_work, &work_list)); mutex_lock(&tconn->data.mutex); if (tconn->data.socket && cork) @@ -1758,7 +1758,7 @@ int drbd_worker(struct drbd_thread *thi) list_del_init(&w->list); w->cb(w, 1); } - dequeue_work_batch(&tconn->data.work, &work_list); + dequeue_work_batch(&tconn->sender_work, &work_list); } while (!list_empty(&work_list)); rcu_read_lock(); |