diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2011-07-28 15:56:02 +0200 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2014-02-17 16:50:40 +0100 |
commit | b5043c5e2ca0de11a22e02cd8835c9489f833722 (patch) | |
tree | 337175f55d4e53b9d11f1b521234934d035ffbb9 /drivers/block/drbd/drbd_nl.c | |
parent | 84b8c06b6591e73250e6ab4834a02a86c8994b91 (diff) |
drbd: Turn conn_flush_workqueue() into drbd_flush_workqueue()
The new function can flush any work queue, not just the work queue of the data
socket of a connection.
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com>
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 6b09eb693c96..2086b12d3f75 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -1181,7 +1181,7 @@ void drbd_reconsider_max_bio_size(struct drbd_device *device) static void conn_reconfig_start(struct drbd_connection *connection) { drbd_thread_start(&connection->worker); - conn_flush_workqueue(connection); + drbd_flush_workqueue(&connection->sender_work); } /* if still unconfigured, stops worker again. */ @@ -1600,7 +1600,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info) */ wait_event(device->misc_wait, !atomic_read(&device->ap_pending_cnt) || drbd_suspended(device)); /* and for any other previously queued work */ - drbd_flush_workqueue(device); + drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work); rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE); retcode = rv; /* FIXME: Type mismatch. */ @@ -2249,7 +2249,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info) ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0; - conn_flush_workqueue(connection); + drbd_flush_workqueue(&connection->sender_work); mutex_lock(&adm_ctx.resource->conf_update); old_net_conf = connection->net_conf; @@ -2589,7 +2589,7 @@ int drbd_adm_invalidate(struct sk_buff *skb, struct genl_info *info) * Also wait for it's after_state_ch(). */ drbd_suspend_io(device); wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags)); - drbd_flush_workqueue(device); + drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work); /* If we happen to be C_STANDALONE R_SECONDARY, just change to * D_INCONSISTENT, and set all bits in the bitmap. Otherwise, @@ -2655,7 +2655,7 @@ int drbd_adm_invalidate_peer(struct sk_buff *skb, struct genl_info *info) * Also wait for it's after_state_ch(). */ drbd_suspend_io(device); wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags)); - drbd_flush_workqueue(device); + drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work); /* If we happen to be C_STANDALONE R_PRIMARY, just set all bits * in the bitmap. Otherwise, try to start a resync handshake |