From: Philipp Reisner <philipp.reisner@linbit.com>
To: Jens Axboe <axboe@fb.com>, linux-kernel@vger.kernel.org
Cc: drbd-dev@lists.linbit.com
Subject: [PATCH 21/38] drbd: Rename asender to ack_receiver
Date: Wed, 25 Nov 2015 11:53:54 +0100 [thread overview]
Message-ID: <1448448851-10343-22-git-send-email-philipp.reisner@linbit.com> (raw)
In-Reply-To: <1448448851-10343-1-git-send-email-philipp.reisner@linbit.com>
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>
---
drivers/block/drbd/drbd_int.h | 6 +++---
drivers/block/drbd/drbd_main.c | 10 +++++-----
drivers/block/drbd/drbd_receiver.c | 6 +++---
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 1d00f2e..dee6297 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -754,7 +754,7 @@ struct drbd_connection {
unsigned long last_reconnect_jif;
struct drbd_thread receiver;
struct drbd_thread worker;
- struct drbd_thread asender;
+ struct drbd_thread ack_receiver;
/* cached pointers,
* 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);
/* drbd_receiver.c */
extern int drbd_receiver(struct drbd_thread *thi);
-extern int drbd_asender(struct drbd_thread *thi);
+extern int drbd_ack_receiver(struct drbd_thread *thi);
extern bool drbd_rs_c_min_rate_throttle(struct drbd_device *device);
extern bool drbd_rs_should_slow_down(struct drbd_device *device, sector_t sector,
bool throttle_if_app_is_waiting);
@@ -1971,7 +1971,7 @@ extern void drbd_flush_workqueue(struct drbd_work_queue *work_queue);
static inline void wake_asender(struct drbd_connection *connection)
{
if (test_bit(SIGNAL_ASENDER, &connection->flags))
- force_sig(DRBD_SIG, connection->asender.task);
+ force_sig(DRBD_SIG, connection->ack_receiver.task);
}
static 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 f66294d..445f2c8 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
/* long elapsed = (long)(jiffies - device->last_received); */
drop_it = connection->meta.socket == sock
- || !connection->asender.task
- || get_t_state(&connection->asender) != RUNNING
+ || !connection->ack_receiver.task
+ || get_t_state(&connection->ack_receiver) != RUNNING
|| connection->cstate < C_WF_REPORT_PARAMS;
if (drop_it)
@@ -2564,7 +2564,7 @@ int set_resource_options(struct drbd_resource *resource, struct res_opts *res_op
cpumask_copy(resource->cpu_mask, new_cpu_mask);
for_each_connection_rcu(connection, resource) {
connection->receiver.reset_cpu_mask = 1;
- connection->asender.reset_cpu_mask = 1;
+ connection->ack_receiver.reset_cpu_mask = 1;
connection->worker.reset_cpu_mask = 1;
}
}
@@ -2653,8 +2653,8 @@ struct drbd_connection *conn_create(const char *name, struct res_opts *res_opts)
connection->receiver.connection = connection;
drbd_thread_init(resource, &connection->worker, drbd_worker, "worker");
connection->worker.connection = connection;
- drbd_thread_init(resource, &connection->asender, drbd_asender, "asender");
- connection->asender.connection = connection;
+ drbd_thread_init(resource, &connection->ack_receiver, drbd_ack_receiver, "ack_recv");
+ connection->ack_receiver.connection = connection;
kref_init(&connection->kref);
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 61b73c7..eed4ae9 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1099,7 +1099,7 @@ randomize:
return 0;
}
- drbd_thread_start(&connection->asender);
+ drbd_thread_start(&connection->ack_receiver);
mutex_lock(&connection->resource->conf_update);
/* 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)
conn_request_state(connection, NS(conn, C_NETWORK_FAILURE), CS_HARD);
/* asender does not clean up anything. it must not interfere, either */
- drbd_thread_stop(&connection->asender);
+ drbd_thread_stop(&connection->ack_receiver);
drbd_free_sock(connection);
rcu_read_lock();
@@ -5487,7 +5487,7 @@ static struct asender_cmd asender_tbl[] = {
[P_RETRY_WRITE] = { sizeof(struct p_block_ack), got_BlockAck },
};
-int drbd_asender(struct drbd_thread *thi)
+int drbd_ack_receiver(struct drbd_thread *thi)
{
struct drbd_connection *connection = thi->connection;
struct asender_cmd *cmd = NULL;
--
1.9.1
next prev parent reply other threads:[~2015-11-25 11:06 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-25 10:53 [PATCH 00/38] DRBD update Philipp Reisner
2015-11-25 10:53 ` [PATCH 01/38] MAINTAINERS: Updated information for DRBD DRIVER Philipp Reisner
2015-11-25 10:53 ` [PATCH 02/38] drbd: Remove pointless check Philipp Reisner
2015-11-25 10:53 ` [PATCH 03/38] drbd: De-inline drbd_should_do_remote() and drbd_should_send_out_of_sync() Philipp Reisner
2015-11-25 10:53 ` [PATCH 04/38] drbd: Get rid of some first_peer_device() calls Philipp Reisner
2015-11-25 10:53 ` [PATCH 05/38] drbd: Move enum write_ordering_e to drbd.h Philipp Reisner
2015-11-25 10:53 ` [PATCH 06/38] drbd: drbd_adm_attach(): Add missing drbd_resync_after_changed() Philipp Reisner
2015-11-25 10:53 ` [PATCH 07/38] drbd: Fix locking across all resources Philipp Reisner
2015-11-25 10:53 ` [PATCH 08/38] drbd: Backport the "events2" command Philipp Reisner
2015-11-25 10:53 ` [PATCH 09/38] drbd: Backport the "status" command Philipp Reisner
2015-11-25 10:53 ` [PATCH 10/38] drbd: Deletion of an unnecessary check before the function call "lc_destroy" Philipp Reisner
2015-11-25 10:53 ` [PATCH 11/38] drbd: Replace 0 with the more meaningful GFP_NOWAIT Philipp Reisner
2015-11-25 10:53 ` [PATCH 12/38] drbd: Fix spurious disk-timeout Philipp Reisner
2015-11-25 10:53 ` [PATCH 13/38] drbd: drop remnants of connector -- we don't use it anymore in drbd 8.4 Philipp Reisner
2015-11-25 10:53 ` [PATCH 14/38] drbd: drbdsetup detach of an unresponsive local disk should not block IO "forever" Philipp Reisner
2015-11-25 10:53 ` [PATCH 15/38] drbd: also bump UUIDs if a diskless primary connects Philipp Reisner
2015-11-25 10:53 ` [PATCH 16/38] drbd: add comment why we want to first call local-io-error, then send state Philipp Reisner
2015-11-25 10:53 ` [PATCH 17/38] drbd: drbd_panic_after_delayed_completion_of_aborted_request() Philipp Reisner
2015-11-25 10:53 ` [PATCH 18/38] drbd: improve network timeout detection Philipp Reisner
2015-11-25 10:53 ` [PATCH 19/38] drbd: fix NULL deref in remember_new_state Philipp Reisner
2015-11-25 10:53 ` [PATCH 20/38] drbd: fix refcount error during detach of an already failed disk Philipp Reisner
2015-11-25 10:53 ` Philipp Reisner [this message]
2015-11-25 10:53 ` [PATCH 22/38] drbd: Create a dedicated workqueue for sending acks on the control connection Philipp Reisner
2015-11-25 10:53 ` [PATCH 23/38] drbd: prevent NULL pointer deref when resuming diskless primary Philipp Reisner
2015-11-25 10:53 ` [PATCH 24/38] drbd: debugfs: expose ed_data_gen_id Philipp Reisner
2015-11-25 10:53 ` [PATCH 25/38] drbd: use resource name in workqueue Philipp Reisner
2015-11-25 10:53 ` [PATCH 26/38] drbd: avoid redefinition of BITS_PER_PAGE Philipp Reisner
2015-11-25 10:54 ` [PATCH 27/38] drbd: use bitmap_weight() helper, don't open code Philipp Reisner
2015-11-25 10:54 ` [PATCH 28/38] drbd: fix spurious alert level printk Philipp Reisner
2015-11-25 10:54 ` [PATCH 29/38] drbd: fix queue limit setup for discard Philipp Reisner
2015-11-25 10:54 ` [PATCH 30/38] drbd: make drbd known to lsblk: use bd_link_disk_holder Philipp Reisner
2015-11-25 10:54 ` [PATCH 31/38] lru_cache: Converted lc_seq_printf_status to return void Philipp Reisner
2015-11-25 10:54 ` [PATCH 32/38] drbd: don't block forever in disconnect during resync if fencing=r-a-stonith Philipp Reisner
2015-11-25 10:54 ` [PATCH 33/38] drbd: fix memory leak in drbd_adm_resize Philipp Reisner
2015-11-25 10:54 ` [PATCH 34/38] drbd: fix "endless" transfer log walk in protocol A Philipp Reisner
2015-11-25 10:54 ` [PATCH 35/38] drbd: make suspend_io() / resume_io() must be thread and recursion safe Philipp Reisner
2015-11-25 10:54 ` [PATCH 36/38] drbd: separate out __al_write_transaction helper function Philipp Reisner
2015-11-25 10:54 ` [PATCH 37/38] drbd: avoid potential deadlock during handshake Philipp Reisner
2015-11-25 10:54 ` [PATCH 38/38] drbd: fix error path during resize Philipp Reisner
2015-11-25 18:01 ` [PATCH 00/38] DRBD update Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448448851-10343-22-git-send-email-philipp.reisner@linbit.com \
--to=philipp.reisner@linbit.com \
--cc=axboe@fb.com \
--cc=drbd-dev@lists.linbit.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®