From: Eric Biggers <ebiggers@kernel.org>
To: dm-devel@lists.linux.dev, Alasdair Kergon <agk@redhat.com>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
Benjamin Marzinski <bmarzins@redhat.com>
Cc: Sami Tolvanen <samitolvanen@google.com>,
linux-kernel@vger.kernel.org, Eric Biggers <ebiggers@kernel.org>
Subject: [PATCH] dm-verity: fix up various workqueue-related comments
Date: Sun, 11 Jan 2026 12:26:42 -0800 [thread overview]
Message-ID: <20260111202642.52850-1-ebiggers@kernel.org> (raw)
Replace obsolete mentions of "tasklets" with "softirq context", and
"workqueue" with "kworker".
This reflects the fact that the implementation of the
"try_verify_in_tasklet" dm-verity option now accesses softirq context
using either the BH workqueue API or inline execution, not the tasklet
API. The old names conflated the API with the intended execution
context, so they became outdated when the APIs changed.
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
drivers/md/dm-verity-target.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/md/dm-verity-target.c b/drivers/md/dm-verity-target.c
index 777a0ebe8536..ff71313750f3 100644
--- a/drivers/md/dm-verity-target.c
+++ b/drivers/md/dm-verity-target.c
@@ -252,13 +252,13 @@ static int verity_verify_level(struct dm_verity *v, struct dm_verity_io *io,
if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
data = dm_bufio_get(v->bufio, hash_block, &buf);
if (IS_ERR_OR_NULL(data)) {
/*
- * In tasklet and the hash was not in the bufio cache.
- * Return early and resume execution from a work-queue
- * to read the hash from disk.
+ * In softirq and the hash was not in the bufio cache.
+ * Return early and resume execution from a kworker to
+ * read the hash from disk.
*/
return -EAGAIN;
}
} else {
data = dm_bufio_read_with_ioprio(v->bufio, hash_block,
@@ -301,11 +301,11 @@ static int verity_verify_level(struct dm_verity *v, struct dm_verity_io *io,
v->digest_size) == 0))
aux->hash_verified = 1;
else if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
/*
* Error handling code (FEC included) cannot be run in a
- * tasklet since it may sleep, so fallback to work-queue.
+ * softirq since it may sleep, so fallback to a kworker.
*/
r = -EAGAIN;
goto release_ret_r;
} else if (verity_fec_decode(v, io, DM_VERITY_BLOCK_TYPE_METADATA,
want_digest, hash_block, data) == 0)
@@ -423,12 +423,12 @@ static int verity_handle_data_hash_mismatch(struct dm_verity *v,
sector_t blkno = block->blkno;
u8 *data = block->data;
if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
/*
- * Error handling code (FEC included) cannot be run in the
- * BH workqueue, so fallback to a standard workqueue.
+ * Error handling code (FEC included) cannot be run in a
+ * softirq since it may sleep, so fallback to a kworker.
*/
return -EAGAIN;
}
if (verity_recheck(v, io, want_digest, blkno, data) == 0) {
if (v->validated_blocks)
@@ -517,12 +517,12 @@ static int verity_verify_io(struct dm_verity_io *io)
io->num_pending = 0;
if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
/*
- * Copy the iterator in case we need to restart
- * verification in a work-queue.
+ * Copy the iterator in case we need to restart verification in
+ * a kworker.
*/
iter_copy = io->iter;
iter = &iter_copy;
} else
iter = &io->iter;
@@ -655,11 +655,11 @@ static void verity_bh_work(struct work_struct *w)
int err;
io->in_bh = true;
err = verity_verify_io(io);
if (err == -EAGAIN || err == -ENOMEM) {
- /* fallback to retrying with work-queue */
+ /* fallback to retrying in a kworker */
INIT_WORK(&io->work, verity_work);
queue_work(io->v->verify_wq, &io->work);
return;
}
@@ -1642,11 +1642,11 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
/*
* Using WQ_HIGHPRI improves throughput and completion latency by
* reducing wait times when reading from a dm-verity device.
*
* Also as required for the "try_verify_in_tasklet" feature: WQ_HIGHPRI
- * allows verify_wq to preempt softirq since verification in BH workqueue
+ * allows verify_wq to preempt softirq since verification in softirq
* will fall-back to using it for error handling (or if the bufio cache
* doesn't have required hashes).
*/
v->verify_wq = alloc_workqueue("kverityd", WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
if (!v->verify_wq) {
base-commit: 8fbb8fe75d4cf92eaa7b21828ec39c1bf79a262f
--
2.52.0
next reply other threads:[~2026-01-11 20:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 20:26 Eric Biggers [this message]
2026-01-23 22:52 ` [PATCH] dm-verity: fix up various workqueue-related comments Sami Tolvanen
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=20260111202642.52850-1-ebiggers@kernel.org \
--to=ebiggers@kernel.org \
--cc=agk@redhat.com \
--cc=bmarzins@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=samitolvanen@google.com \
--cc=snitzer@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