xfs: set IOMAP_F_INTEGRITY for zoned writes on integrity devices

xfs_iomap_set_anon_write does not set IOMAP_F_INTEGRITY based on
bdev_has_integrity_csum(), so file system PI generation is silently
skipped for zoned writes on integrity-enabled devices, and left to
the block layer PI generation.

Fixes: 6bbb4d96f7 ("xfs: support T10 protection information")
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
[hch: ported to the recently introduced xfs_iomap_set_anon_write()]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
Anuj Gupta 2026-09-07 10:27:39 +03:00 committed by Carlos Maiolino
parent 761e015e5a
commit 50ba24ccb9

View File

@ -41,6 +41,8 @@ xfs_iomap_set_anon_write(
iomap->offset = offset;
iomap->length = length;
iomap->flags = IOMAP_F_ANON_WRITE | IOMAP_F_DIRTY;
if (bdev_has_integrity_csum(iomap->bdev))
iomap->flags |= IOMAP_F_INTEGRITY;
}
static inline xfs_filblks_t