Support no-journal for dm-integrity devices.

As documented in integritysetup.8, dm-integrity devices support running
without a journal whatsoever. This change allows the
CRYPT_ACTIVATE_NO_JOURNAL flag (the same as is used with `integritysetup
--integrity-no-journal`) to be passed in during dmsetup by specifying
the `no-journal` option in integritytab.5.
This commit is contained in:
Russell Harmon
2023-05-30 16:35:46 +09:00
committed by Yu Watanabe
parent dd3775ab88
commit bcc1ee56c0
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -34,6 +34,9 @@ int parse_integrity_options(
else if (streq(word, "allow-discards")) {
if (ret_activate_flags)
*ret_activate_flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS;
} else if (streq(word, "no-journal")) {
if (ret_activate_flags)
*ret_activate_flags |= CRYPT_ACTIVATE_NO_JOURNAL;
} else if ((val = startswith(word, "journal-watermark="))) {
r = parse_percent(val);
if (r < 0)