Skip to content

Commit c84e21a

Browse files
Eric BiggersMikulas Patocka
authored andcommitted
dm-verity: fix up various workqueue-related comments
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> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
1 parent 17c0e16 commit c84e21a

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

drivers/md/dm-verity-target.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ static int verity_verify_level(struct dm_verity *v, struct dm_verity_io *io,
254254
data = dm_bufio_get(v->bufio, hash_block, &buf);
255255
if (IS_ERR_OR_NULL(data)) {
256256
/*
257-
* In tasklet and the hash was not in the bufio cache.
258-
* Return early and resume execution from a work-queue
259-
* to read the hash from disk.
257+
* In softirq and the hash was not in the bufio cache.
258+
* Return early and resume execution from a kworker to
259+
* read the hash from disk.
260260
*/
261261
return -EAGAIN;
262262
}
@@ -303,7 +303,7 @@ static int verity_verify_level(struct dm_verity *v, struct dm_verity_io *io,
303303
else if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
304304
/*
305305
* Error handling code (FEC included) cannot be run in a
306-
* tasklet since it may sleep, so fallback to work-queue.
306+
* softirq since it may sleep, so fallback to a kworker.
307307
*/
308308
r = -EAGAIN;
309309
goto release_ret_r;
@@ -425,8 +425,8 @@ static int verity_handle_data_hash_mismatch(struct dm_verity *v,
425425

426426
if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
427427
/*
428-
* Error handling code (FEC included) cannot be run in the
429-
* BH workqueue, so fallback to a standard workqueue.
428+
* Error handling code (FEC included) cannot be run in a
429+
* softirq since it may sleep, so fallback to a kworker.
430430
*/
431431
return -EAGAIN;
432432
}
@@ -519,8 +519,8 @@ static int verity_verify_io(struct dm_verity_io *io)
519519

520520
if (static_branch_unlikely(&use_bh_wq_enabled) && io->in_bh) {
521521
/*
522-
* Copy the iterator in case we need to restart
523-
* verification in a work-queue.
522+
* Copy the iterator in case we need to restart verification in
523+
* a kworker.
524524
*/
525525
iter_copy = io->iter;
526526
iter = &iter_copy;
@@ -657,7 +657,7 @@ static void verity_bh_work(struct work_struct *w)
657657
io->in_bh = true;
658658
err = verity_verify_io(io);
659659
if (err == -EAGAIN || err == -ENOMEM) {
660-
/* fallback to retrying with work-queue */
660+
/* fallback to retrying in a kworker */
661661
INIT_WORK(&io->work, verity_work);
662662
queue_work(io->v->verify_wq, &io->work);
663663
return;
@@ -1644,7 +1644,7 @@ static int verity_ctr(struct dm_target *ti, unsigned int argc, char **argv)
16441644
* reducing wait times when reading from a dm-verity device.
16451645
*
16461646
* Also as required for the "try_verify_in_tasklet" feature: WQ_HIGHPRI
1647-
* allows verify_wq to preempt softirq since verification in BH workqueue
1647+
* allows verify_wq to preempt softirq since verification in softirq
16481648
* will fall-back to using it for error handling (or if the bufio cache
16491649
* doesn't have required hashes).
16501650
*/

0 commit comments

Comments
 (0)