]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
configure: check for FS_IOC_READ_VERITY_METADATA availability maint
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 22 Nov 2025 20:12:23 +0000 (21:12 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 9 Dec 2025 13:38:49 +0000 (08:38 -0500)
commit4aba12dc19a95626eb7fa1df2d19c5235c2bc848
treedd94a7b82544db626a758bf4351edb55140c0ba0
parent6f03c698ef53bb9d0cd42c9bd0b68e8ce72f8345
configure: check for FS_IOC_READ_VERITY_METADATA availability

Commit 6bfa843b4435334ac073e42950b48d8bacb54977 ("mke2fs: enable
copying of fs-verity metadata") introduced support for reading
fs-verity metadata, which requires using the
FS_IOC_READ_VERITY_METADATA.

The code is conditionally compiled when the kernel headers have
<linux/fsverity.h> available. Unfortunately, this check is not
sufficient: <linux/fsverity.h> was introduced in Linux 5.10, but the
FS_IOC_READ_VERITY_METADATA was not introduced before 5.12, so if one
is using 5.10 or 5.11 kernel headers, the build fails with:

./../misc/create_inode.c: In function ‘copy_fs_verity_data’:
./../misc/create_inode.c:589:10: error: variable ‘arg’ has initializer but incomplete type
  589 |   struct fsverity_read_metadata_arg arg = {
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
./../misc/create_inode.c:600:20: error: ‘FS_IOC_READ_VERITY_METADATA’ undeclared (first use in this function)
  600 |   size = ioctl(fd, FS_IOC_READ_VERITY_METADATA, &arg);
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~

This commit therefore extends the configure.ac check to ensure that
not only <linux/fsverity.h> exists but also that it defines the
FS_IOC_READ_VERITY_METADATA ioctl.

Closes: https://github.com/tytso/e2fsprogs/pull/256
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
configure
configure.ac
misc/create_inode.c