[PATCH v4 09/15] fs: add fsverity offset

Christian Brauner
2025-07-23T10:58:31Z

Store the offset of the fsverity data pointer from struct inode in
struct super_operations. Both are embedded in the filesystem's private
inode.

This will allow us to drop the fsverity data pointer from struct inode
itself and move it into the filesystem's inode.

Signed-off-by: Christian Brauner <brauner@kernel.org>
---
include/linux/fsverity.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h
index 1eb7eae580be..85831f36e2f8 100644
--- a/include/linux/fsverity.h
+++ b/include/linux/fsverity.h
@@ -28,6 +28,11 @@

/* Verity operations for filesystems */
struct fsverity_operations {
+ /**
+ * The offset of struct fsverity_info from struct inode embedded in
+ * the filesystem's inode.
+ */
+ ptrdiff_t inode_info_offs;

/**
* Begin enabling verity on the given file.

--
2.47.2