summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorJonathan G. Underwood <jonathan.underwood@gmail.com>2020-12-22 20:04:52 +0000
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-12-30 15:24:12 +0100
commitdef3ea14df31ad827c7ef2af3b6ce96ca2e0ebcf (patch)
tree2ce07ef5da2665a0c779e77c12b5203804d178e8 /src/shared
parent90f7f6c5777e9e2a4990f299474f730459054bf4 (diff)
downloadsystemd-def3ea14df31ad827c7ef2af3b6ce96ca2e0ebcf.tar.gz
cryptsetup: add support for workqueue options
This commit adds support for disabling the read and write workqueues with the new crypttab options no-read-workqueue and no-write-workqueue. These correspond to the cryptsetup options --perf-no_read_workqueue and --perf-no_write_workqueue respectively. (cherry picked from commit 227acf0009bde2cd7f8bc371615b05e84137847d)
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/crypt-util.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/shared/crypt-util.h b/src/shared/crypt-util.h
index c25b11599c..ce44cd43e7 100644
--- a/src/shared/crypt-util.h
+++ b/src/shared/crypt-util.h
@@ -6,6 +6,14 @@
#include "macro.h"
+/* These next two are defined in libcryptsetup.h from cryptsetup version 2.3.4 forwards. */
+#ifndef CRYPT_ACTIVATE_NO_READ_WORKQUEUE
+#define CRYPT_ACTIVATE_NO_READ_WORKQUEUE (1 << 24)
+#endif
+#ifndef CRYPT_ACTIVATE_NO_WRITE_WORKQUEUE
+#define CRYPT_ACTIVATE_NO_WRITE_WORKQUEUE (1 << 25)
+#endif
+
DEFINE_TRIVIAL_CLEANUP_FUNC(struct crypt_device *, crypt_free);
void cryptsetup_log_glue(int level, const char *msg, void *usrptr);