Re: [PATCH v14 05/21] fsverity: improve flushing performance of fsverity_fill_zerohash

Matthew Wilcox <[email protected]> Tue, 4 Aug 2026 19:46:03 +0100
Newsgroups gmane.linux.file-systems.f2fs,gmane.linux.file-systems,gmane.comp.file-systems.ext4,gmane.comp.file-systems.btrfs
Message-ID <[email protected]>
On Mon, Aug 03, 2026 at 10:07:55PM +0200, Andrey Albershteyn wrote:
> The current version calls flush_dcache_folio(), in memcpy_to_folio(), to
> flush whole folio on every digest (which is 128 for 4k) on the HIGHMEM
> systems. Open code folio mapping and flushing to copy all digests at
> once.

Have you looked at the implementations of flush_dcache_folio()?  On
any architecture we actually care about, all it does is set one bit
in folio->flags noting that the folio will need to be flushed if
it's going to be accessed by userspace.

But, um, do we support mapping folios containing fsverity data into
userspace?  Can't we just delete the calls to flush_dcache_folio()?