Skip to content

Commit a2b8b2d

Browse files
lostjefflesnitm
authored andcommitted
dm crypt: export sysfs of kcryptd workqueue
It should be helpful to export sysfs of "kcryptd" workqueue in some cases, such as setting specific CPU affinity of the workqueue. Besides, also tweak the name format a little. The slash inside a directory name will be translate into exclamation mark, such as /sys/devices/virtual/workqueue/'kcryptd!253:0'. Signed-off-by: Jeffle Xu <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent 4d7659b commit a2b8b2d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/md/dm-crypt.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3166,11 +3166,12 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
31663166
}
31673167

31683168
if (test_bit(DM_CRYPT_SAME_CPU, &cc->flags))
3169-
cc->crypt_queue = alloc_workqueue("kcryptd/%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
3169+
cc->crypt_queue = alloc_workqueue("kcryptd-%s", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM,
31703170
1, devname);
31713171
else
3172-
cc->crypt_queue = alloc_workqueue("kcryptd/%s",
3173-
WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND,
3172+
cc->crypt_queue = alloc_workqueue("kcryptd-%s",
3173+
WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM |
3174+
WQ_UNBOUND | WQ_SYSFS,
31743175
num_online_cpus(), devname);
31753176
if (!cc->crypt_queue) {
31763177
ti->error = "Couldn't create kcryptd queue";

0 commit comments

Comments
 (0)