xfs_io: report fsverity status via statx
Report if a file has verity enable.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
diff --git a/io/attr.c b/io/attr.c
index fd82a2e..5df4edb 100644
--- a/io/attr.c
+++ b/io/attr.c
@@ -37,6 +37,7 @@
{ FS_XFLAG_FILESTREAM, "S", "filestream" },
{ FS_XFLAG_DAX, "x", "dax" },
{ FS_XFLAG_COWEXTSIZE, "C", "cowextsize" },
+ { FS_XFLAG_VERITY, "v", "verity" },
{ FS_XFLAG_HASATTR, "X", "has-xattr" },
{ 0, NULL, NULL }
};
@@ -66,6 +67,7 @@
" S -- enable filestreams allocator for this directory\n"
" x -- Use direct access (DAX) for data in this file\n"
" C -- for files with shared blocks, observe the inode CoW extent size value\n"
+" v -- file has fsverity metadata to validate data contents\n"
" X -- file has extended attributes (cannot be changed using chattr)\n"
"\n"
" Options:\n"
diff --git a/man/man2/ioctl_xfs_fsgetxattr.2 b/man/man2/ioctl_xfs_fsgetxattr.2
index 2c626a7..ffcdedc 100644
--- a/man/man2/ioctl_xfs_fsgetxattr.2
+++ b/man/man2/ioctl_xfs_fsgetxattr.2
@@ -200,6 +200,9 @@
If set on a directory, new files and subdirectories created in the directory
will have both the flag and the CoW extent size value set.
.TP
+.B XFS_XFLAG_VERITY
+The file has fsverity metadata to verify the file contents.
+.TP
.B XFS_XFLAG_HASATTR
The file has extended attributes associated with it.
diff --git a/man/man8/xfs_io.8 b/man/man8/xfs_io.8
index e22fd1e..bcef537 100644
--- a/man/man8/xfs_io.8
+++ b/man/man8/xfs_io.8
@@ -935,6 +935,10 @@
copy on write extent hint (XFS_XFLAG_COWEXTSIZE)
.TP
+.B v
+fsverity enabled (XFS_XFLAG_VERITY)
+
+.TP
.B X
has extended attributes (XFS_XFLAG_HASATTR)
.RE