Re: [PATCH 09/17] xfs: move PI generation into xfs_submit_zoned_bio

From
Christoph Hellwig <hch@lst.de>
Date
2026-09-07 05:51:18
Also in
linux-xfs
Reply to
Anuj Gupta, 2026-09-02
On Wed, Sep 02, 2026 at 11:52:21PM +0530, Anuj Gupta wrote:
quoted
 xfs_open_zone_free_rcu(
@@ -890,6 +891,8 @@ xfs_submit_zoned_bio(
 		xfs_mark_rtg_boundary(ioend);
 	}
 
+	if (ioend->io_flags & IOMAP_IOEND_INTEGRITY)
+		fs_bio_integrity_generate(&ioend->io_bio);
 	submit_bio(&ioend->io_bio);
It seems to me that IOMAP_IOEND_INTEGRITY might never be set here. The
zoned write iomaps in xfs_zoned_map_blocks() and
xfs_zoned_direct_write_iomap_begin() do not set IOMAP_F_INTEGRITY based
on bdev_has_integrity_csum(). Should both paths set it? I didn't have a
zoned device to confirm this so this is just from a bit of code reading
only.

This looks like a pre-existing bug from 6bbb4d96f797 ("xfs: support T10
protection information") which can be fixed with something like this?
Yeah.  I'm pretty sure I had a fix for this in the queue, but it looks
like that got lost when rebasing on top of xfs_iomap_set_anon_write,
which itself came from a Sashiko review for a trivial bug when
setting this flag.
[PATCH] xfs: set IOMAP_F_INTEGRITY for zoned writes on integrity devices

Neither xfs_zoned_map_blocks() nor xfs_zoned_direct_write_iomap_begin()
sets IOMAP_F_INTEGRITY based on bdev_has_integrity_csum(), so PI
generation is silently skipped for zoned writes on integrity-enabled
devices. Add the check in both paths.
This seems to be against a tree that doens't have
xfs_iomap_set_anon_write yet.  I've rebased it on top of that and
added it to my queue (keeping your attribution).
Thread (33 messages) 33 messages, 3 authors, last reply 2026-09-07
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help