]> git.ipfire.org Git - thirdparty/util-linux.git/commit
verity: use <roothash>-verity as the device mapper name instead of libmnt_<image>
authorLuca Boccassi <bluca@debian.org>
Thu, 10 Aug 2023 23:18:22 +0000 (00:18 +0100)
committerLuca Boccassi <bluca@debian.org>
Fri, 11 Aug 2023 15:09:34 +0000 (16:09 +0100)
commit001a489143bde8835477fc1c32d5cde1c2c09b9d
tree90fd6bbcdc4e797912025d10113619ef332eafe6
parent123fe3336fe109200e4c6c645ac8c9202c38b3f6
verity: use <roothash>-verity as the device mapper name instead of libmnt_<image>

If the roothash is the same among two volumes, then the images are guaranteed
to be equivalent. The filename of the image on the other hand does not imply
that the images are equivalent.
In systemd we open verity devices as '<roothash>-verity', so that we know for
sure we can reuse them. Do the same here, so that we are a bit more confident
that images can be reused before the safety check, and also so that we can
take advantage of the kernel refcounting together with images used by systemd,
as setting up verity is expensive.

Signed-off-by: Luca Boccassi <bluca@debian.org>
libmount/src/hook_veritydev.c