Workaround for dm-integrity kernel table bug.

Some kernels show invalid dm-integrity table if suberblock
contains "recalculate" bit.

We can workaround that by setting recalculate option in table
(kernel uses bits from superblock anyway), so the table displayed
is always correct.

Fixes: #538
This commit is contained in:
Milan Broz
2020-02-20 14:02:37 +01:00
parent 8f7e898341
commit 7b206fb13d
3 changed files with 9 additions and 4 deletions

View File

@@ -2156,7 +2156,7 @@ int LUKS2_activate(struct crypt_device *cd,
return -EINVAL;
}
r = INTEGRITY_create_dmd_device(cd, NULL, NULL, NULL, NULL, &dmdi, dmd.flags);
r = INTEGRITY_create_dmd_device(cd, NULL, NULL, NULL, NULL, &dmdi, dmd.flags, 0);
if (r)
return r;