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>
This commit is contained in:
Lars Ellenberg
2011-11-14 15:42:37 +01:00
committed by Philipp Reisner
parent 8c0785a5c9
commit d5b27b01f1
7 changed files with 28 additions and 32 deletions
+2 -2
View File
@@ -740,7 +740,6 @@ struct drbd_work_queue {
};
struct drbd_socket {
struct drbd_work_queue work;
struct mutex mutex;
struct socket *socket;
/* this way we get our
@@ -871,6 +870,7 @@ struct drbd_tconn { /* is a resource from the config file */
struct drbd_thread worker;
struct drbd_thread asender;
cpumask_var_t cpu_mask;
struct drbd_work_queue sender_work;
};
struct drbd_conf {
@@ -2228,7 +2228,7 @@ static inline void dec_ap_bio(struct drbd_conf *mdev)
wake_up(&mdev->misc_wait);
if (ap_bio == 0 && test_bit(BITMAP_IO, &mdev->flags)) {
if (!test_and_set_bit(BITMAP_IO_QUEUED, &mdev->flags))
drbd_queue_work(&mdev->tconn->data.work, &mdev->bm_io_work.w);
drbd_queue_work(&mdev->tconn->sender_work, &mdev->bm_io_work.w);
}
}