xfs: set IOMAP_F_INTEGRITY for zoned writes on integrity devices
PATCH 1/1 xfs: set IOMAP_F_INTEGRITY for zoned writes on integrity devices
From: Anuj Gupta <[email protected]>
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.
--- fs/xfs/xfs_iomap.h | 2 ++ 1 file changed, 2 insertions(+)
fs/xfs/xfs_iomap.h +2 -0
@@ -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
Signature · 1 line
2.53.0
Quoted 11 lines · Christoph Hellwig
From: Anuj Gupta <[email protected]>
xfs_iomap_set_anon_writedoes not setIOMAP_F_INTEGRITYbased onbdev_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 6bbb4d96f797 ("xfs: support T10 protection information")Signed-off-by Anuj Gupta <[email protected]>[hch: ported to the recently introduced xfs_iomap_set_anon_write()]Signed-off-by Christoph Hellwig <[email protected]>
Looks good to me,
--D
Quoted 21 lines
--- fs/xfs/xfs_iomap.h | 2 ++ 1 file changed, 2 insertions(+)fs/xfs/xfs_iomap.h +2
-0@@ -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_tSignature · 1 line
2.53.0
Quoted 6 lines · Christoph Hellwig
xfs_iomap_set_anon_writedoes not setIOMAP_F_INTEGRITYbased onbdev_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.
Applied to for-next, thanks!
[1/1] xfs: set IOMAP_F_INTEGRITY for zoned writes on integrity devices
commit: 50ba24ccb9a94f61c707209442ca23d98c815052
Best regards,
Signature · 1 line
Carlos Maiolino <[email protected]>