mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
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:
committed by
Yu Watanabe
parent
dd3775ab88
commit
bcc1ee56c0
@@ -72,6 +72,17 @@
|
|||||||
</para></listitem>
|
</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>no-journal</option></term>
|
||||||
|
|
||||||
|
<listitem><para>
|
||||||
|
Disable the journal. Corresponds to the "direct writes" mode documented in
|
||||||
|
<ulink url="https://docs.kernel.org/admin-guide/device-mapper/dm-integrity.html">the dm-integrity documentation</ulink>.
|
||||||
|
Note that without a journal, if there is a crash, it is possible that the integrity tags and data will not match. If used, the journal-*
|
||||||
|
options below will have no effect if passed.
|
||||||
|
</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>journal-watermark=[0..100]%</option></term>
|
<term><option>journal-watermark=[0..100]%</option></term>
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ int parse_integrity_options(
|
|||||||
else if (streq(word, "allow-discards")) {
|
else if (streq(word, "allow-discards")) {
|
||||||
if (ret_activate_flags)
|
if (ret_activate_flags)
|
||||||
*ret_activate_flags |= CRYPT_ACTIVATE_ALLOW_DISCARDS;
|
*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="))) {
|
} else if ((val = startswith(word, "journal-watermark="))) {
|
||||||
r = parse_percent(val);
|
r = parse_percent(val);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user