aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-07-28 09:56:02 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 10:50:40 -0500
commitb5043c5e2ca0de11a22e02cd8835c9489f833722 (patch)
tree337175f55d4e53b9d11f1b521234934d035ffbb9 /drivers/block/drbd/drbd_nl.c
parent84b8c06b6591e73250e6ab4834a02a86c8994b91 (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.c10
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)
1181static void conn_reconfig_start(struct drbd_connection *connection) 1181static void conn_reconfig_start(struct drbd_connection *connection)
1182{ 1182{
1183 drbd_thread_start(&connection->worker); 1183 drbd_thread_start(&connection->worker);
1184 conn_flush_workqueue(connection); 1184 drbd_flush_workqueue(&connection->sender_work);
1185} 1185}
1186 1186
1187/* if still unconfigured, stops worker again. */ 1187/* if still unconfigured, stops worker again. */
@@ -1600,7 +1600,7 @@ int drbd_adm_attach(struct sk_buff *skb, struct genl_info *info)
1600 */ 1600 */
1601 wait_event(device->misc_wait, !atomic_read(&device->ap_pending_cnt) || drbd_suspended(device)); 1601 wait_event(device->misc_wait, !atomic_read(&device->ap_pending_cnt) || drbd_suspended(device));
1602 /* and for any other previously queued work */ 1602 /* and for any other previously queued work */
1603 drbd_flush_workqueue(device); 1603 drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work);
1604 1604
1605 rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE); 1605 rv = _drbd_request_state(device, NS(disk, D_ATTACHING), CS_VERBOSE);
1606 retcode = rv; /* FIXME: Type mismatch. */ 1606 retcode = rv; /* FIXME: Type mismatch. */
@@ -2249,7 +2249,7 @@ int drbd_adm_connect(struct sk_buff *skb, struct genl_info *info)
2249 2249
2250 ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0; 2250 ((char *)new_net_conf->shared_secret)[SHARED_SECRET_MAX-1] = 0;
2251 2251
2252 conn_flush_workqueue(connection); 2252 drbd_flush_workqueue(&connection->sender_work);
2253 2253
2254 mutex_lock(&adm_ctx.resource->conf_update); 2254 mutex_lock(&adm_ctx.resource->conf_update);
2255 old_net_conf = connection->net_conf; 2255 old_net_conf = connection->net_conf;
@@ -2589,7 +2589,7 @@ int drbd_adm_invalidate(struct sk_buff *skb, struct genl_info *info)
2589 * Also wait for it's after_state_ch(). */ 2589 * Also wait for it's after_state_ch(). */
2590 drbd_suspend_io(device); 2590 drbd_suspend_io(device);
2591 wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags)); 2591 wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags));
2592 drbd_flush_workqueue(device); 2592 drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work);
2593 2593
2594 /* If we happen to be C_STANDALONE R_SECONDARY, just change to 2594 /* If we happen to be C_STANDALONE R_SECONDARY, just change to
2595 * D_INCONSISTENT, and set all bits in the bitmap. Otherwise, 2595 * 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)
2655 * Also wait for it's after_state_ch(). */ 2655 * Also wait for it's after_state_ch(). */
2656 drbd_suspend_io(device); 2656 drbd_suspend_io(device);
2657 wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags)); 2657 wait_event(device->misc_wait, !test_bit(BITMAP_IO, &device->flags));
2658 drbd_flush_workqueue(device); 2658 drbd_flush_workqueue(&first_peer_device(device)->connection->sender_work);
2659 2659
2660 /* If we happen to be C_STANDALONE R_PRIMARY, just set all bits 2660 /* If we happen to be C_STANDALONE R_PRIMARY, just set all bits
2661 * in the bitmap. Otherwise, try to start a resync handshake 2661 * in the bitmap. Otherwise, try to start a resync handshake