aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2015-03-16 10:01:00 -0400
committerJens Axboe <axboe@fb.com>2015-11-25 11:22:01 -0500
commit1c03e52083c8fa6e70a0b921d25d1916f68320fc (patch)
tree9fc11b476b0279673da722b3daeec78a2bbd6bc9
parent6434f404b43afa0cfe54fec009760510431ca103 (diff)
drbd: Rename asender to ack_receiver
This prepares the next patch where the sending on the meta (or control) socket is moved to a dedicated workqueue. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--drivers/block/drbd/drbd_int.h6
-rw-r--r--drivers/block/drbd/drbd_main.c10
-rw-r--r--drivers/block/drbd/drbd_receiver.c6
3 files changed, 11 insertions, 11 deletions
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 1d00f2e061c5..dee629797d0f 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -754,7 +754,7 @@ struct drbd_connection {
754 unsigned long last_reconnect_jif; 754 unsigned long last_reconnect_jif;
755 struct drbd_thread receiver; 755 struct drbd_thread receiver;
756 struct drbd_thread worker; 756 struct drbd_thread worker;
757 struct drbd_thread asender; 757 struct drbd_thread ack_receiver;
758 758
759 /* cached pointers, 759 /* cached pointers,
760 * so we can look up the oldest pending requests more quickly. 760 * so we can look up the oldest pending requests more quickly.
@@ -1557,7 +1557,7 @@ extern void drbd_endio_write_sec_final(struct drbd_peer_request *peer_req);
1557 1557
1558/* drbd_receiver.c */ 1558/* drbd_receiver.c */
1559extern int drbd_receiver(struct drbd_thread *thi); 1559extern int drbd_receiver(struct drbd_thread *thi);
1560extern int drbd_asender(struct drbd_thread *thi); 1560extern int drbd_ack_receiver(struct drbd_thread *thi);
1561extern bool drbd_rs_c_min_rate_throttle(struct drbd_device *device); 1561extern bool drbd_rs_c_min_rate_throttle(struct drbd_device *device);
1562extern bool drbd_rs_should_slow_down(struct drbd_device *device, sector_t sector, 1562extern bool drbd_rs_should_slow_down(struct drbd_device *device, sector_t sector,
1563 bool throttle_if_app_is_waiting); 1563 bool throttle_if_app_is_waiting);
@@ -1971,7 +1971,7 @@ extern void drbd_flush_workqueue(struct drbd_work_queue *work_queue);
1971static inline void wake_asender(struct drbd_connection *connection) 1971static inline void wake_asender(struct drbd_connection *connection)
1972{ 1972{
1973 if (test_bit(SIGNAL_ASENDER, &connection->flags)) 1973 if (test_bit(SIGNAL_ASENDER, &connection->flags))
1974 force_sig(DRBD_SIG, connection->asender.task); 1974 force_sig(DRBD_SIG, connection->ack_receiver.task);
1975} 1975}
1976 1976
1977static inline void request_ping(struct drbd_connection *connection) 1977static inline void request_ping(struct drbd_connection *connection)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index f66294db3b08..445f2c8bfa1b 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -1436,8 +1436,8 @@ static int we_should_drop_the_connection(struct drbd_connection *connection, str
1436 /* long elapsed = (long)(jiffies - device->last_received); */ 1436 /* long elapsed = (long)(jiffies - device->last_received); */
1437 1437
1438 drop_it = connection->meta.socket == sock 1438 drop_it = connection->meta.socket == sock
1439 || !connection->asender.task 1439 || !connection->ack_receiver.task
1440 || get_t_state(&connection->asender) != RUNNING 1440 || get_t_state(&connection->ack_receiver) != RUNNING
1441 || connection->cstate < C_WF_REPORT_PARAMS; 1441 || connection->cstate < C_WF_REPORT_PARAMS;
1442 1442
1443 if (drop_it) 1443 if (drop_it)
@@ -2564,7 +2564,7 @@ int set_resource_options(struct drbd_resource *resource, struct res_opts *res_op
2564 cpumask_copy(resource->cpu_mask, new_cpu_mask); 2564 cpumask_copy(resource->cpu_mask, new_cpu_mask);
2565 for_each_connection_rcu(connection, resource) { 2565 for_each_connection_rcu(connection, resource) {
2566 connection->receiver.reset_cpu_mask = 1; 2566 connection->receiver.reset_cpu_mask = 1;
2567 connection->asender.reset_cpu_mask = 1; 2567 connection->ack_receiver.reset_cpu_mask = 1;
2568 connection->worker.reset_cpu_mask = 1; 2568 connection->worker.reset_cpu_mask = 1;
2569 } 2569 }
2570 } 2570 }
@@ -2653,8 +2653,8 @@ struct drbd_connection *conn_create(const char *name, struct res_opts *res_opts)
2653 connection->receiver.connection = connection; 2653 connection->receiver.connection = connection;
2654 drbd_thread_init(resource, &connection->worker, drbd_worker, "worker"); 2654 drbd_thread_init(resource, &connection->worker, drbd_worker, "worker");
2655 connection->worker.connection = connection; 2655 connection->worker.connection = connection;
2656 drbd_thread_init(resource, &connection->asender, drbd_asender, "asender"); 2656 drbd_thread_init(resource, &connection->ack_receiver, drbd_ack_receiver, "ack_recv");
2657 connection->asender.connection = connection; 2657 connection->ack_receiver.connection = connection;
2658 2658
2659 kref_init(&connection->kref); 2659 kref_init(&connection->kref);
2660 2660
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 61b73c77a690..eed4ae9107b4 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1099,7 +1099,7 @@ randomize:
1099 return 0; 1099 return 0;
1100 } 1100 }
1101 1101
1102 drbd_thread_start(&connection->asender); 1102 drbd_thread_start(&connection->ack_receiver);
1103 1103
1104 mutex_lock(&connection->resource->conf_update); 1104 mutex_lock(&connection->resource->conf_update);
1105 /* The discard_my_data flag is a single-shot modifier to the next 1105 /* The discard_my_data flag is a single-shot modifier to the next
@@ -4656,7 +4656,7 @@ static void conn_disconnect(struct drbd_connection *connection)
4656 conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD); 4656 conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD);
4657 4657
4658 /* asender does not clean up anything. it must not interfere, either */ 4658 /* asender does not clean up anything. it must not interfere, either */
4659 drbd_thread_stop(&connection->asender); 4659 drbd_thread_stop(&connection->ack_receiver);
4660 drbd_free_sock(connection); 4660 drbd_free_sock(connection);
4661 4661
4662 rcu_read_lock(); 4662 rcu_read_lock();
@@ -5487,7 +5487,7 @@ static struct asender_cmd asender_tbl[] = {
5487 [P_RETRY_WRITE] = { sizeof(struct p_block_ack), got_BlockAck }, 5487 [P_RETRY_WRITE] = { sizeof(struct p_block_ack), got_BlockAck },
5488}; 5488};
5489 5489
5490int drbd_asender(struct drbd_thread *thi) 5490int drbd_ack_receiver(struct drbd_thread *thi)
5491{ 5491{
5492 struct drbd_connection *connection = thi->connection; 5492 struct drbd_connection *connection = thi->connection;
5493 struct asender_cmd *cmd = NULL; 5493 struct asender_cmd *cmd = NULL;