Re: [f2fs-dev] [PATCH v14 13/21] xfs: use read ioend for fsverity data verification
Andrey Albershteyn via Linux-f2fs-devel <[email protected]> Tue, 11 Aug 2026 10:18:05 +0200
| Newsgroups | net.sourceforge.lists.linux-f2fs-devel,dev.linux.lists.fsverity,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
> > > "If we have fsverity and block device integrity attached to this bio, > > > we need to run both validations from the separate fsverity workqueue > > > to avoid deadlocking due to fsverity issuing its own reads." > > > > > > (Assuming I understand the fsverity && pi case correctly.) > > > > > > One thing I'm not clear about -- why is it safe to do the fsverity > > > validation here if PI isn't enabled? Can't that also issue IO to pull > > > in merkle tree blocks? > > > > Without PI, fsverity metadata is read without XFS bio completion > > path, we don't get here for the descriptor/metadata reads > > (see xfs_get_iomap_read_ops()). So, we won't block the queue, as > > data ioends won't be mixed with metadata ioends. > > > > With PI, all fsverity reads goes through this path. We could get a > > case that data ioend is waiting for metadata IO to be completed which > > in turn is pending for data ioend to be finished (due to batch > > processing of multiple BIOs in the bio_complete wq). > > > > So, this will issue more IO, but this IO will not get onto this > > queue (it will go through iomap_bio_submit_read()). > > Ah, ok. Maybe add to that comment: > > "If we have fsverity enabled but block device integrity is not enabled, > completion of the fsverity metadata reads does not require a workqueue > so there is no deadlock potential." > > then? > > (Just echoing you to make sure I understand completely.) > yes, I've changed it to: + /* + * If we have fsverity and block device integrity attached to this bio, + * we need to run fsverity verification of data folios from a separate + * fsverity workqueue. This is necessary to avoid deadlocking due to + * fsverity issuing more reads of fsverity metadata which would be + * processed by the same worker in the BIO completion workqueue. + * + * Without device integrity, fsverity metadata IO will not use ioends for + * completion. + */ -- - Andrey _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel