[PATCH v14 11/21] xfs: don't report dio_mem_align and dio_offset_align for fsverity files
Andrey Albershteyn <[email protected]> Mon, 3 Aug 2026 22:08:01 +0200
| Newsgroups | org.kernel.vger.linux-xfs,dev.linux.lists.fsverity,net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <[email protected]> |
Sashiko.dev reported that while fsverity files falls back to the buffered IO for Direct I/O, they should not report non-zero values in dio_mem_align and dio_offset_align, meaning it's not supported. Signed-off-by: Andrey Albershteyn <[email protected]> --- fs/xfs/xfs_iops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c index 55667cc762f8..70637cdcc299 100644 --- a/fs/xfs/xfs_iops.c +++ b/fs/xfs/xfs_iops.c @@ -35,6 +35,7 @@ #include <linux/security.h> #include <linux/iversion.h> #include <linux/fiemap.h> +#include <linux/fsverity.h> /* * Directories have different lock order w.r.t. mmap_lock compared to regular @@ -580,6 +581,10 @@ xfs_report_dioalign( struct block_device *bdev = target->bt_bdev; stat->result_mask |= STATX_DIOALIGN | STATX_DIO_READ_ALIGN; + + if (fsverity_active(VFS_I(ip))) + return; + stat->dio_mem_align = bdev_dma_alignment(bdev) + 1; /* -- 2.54.0