On Sat, Feb 14, 2026 at 01:18:29PM -0800, Eric Biggers wrote: > Replace the only remaining caller of fsverity_verify_page() with a > direct call to fsverity_verify_blocks(). This will allow > fsverity_verify_page() to be removed. > > Make it large-folio-aware by using the page's offset in the folio > instead of 0, though the rest of f2fs_verify_cluster() and f2fs > decompression as a whole still assumes small folios. > > Suggested-by: Linus Torvalds <[email protected]> > Signed-off-by: Eric Biggers <[email protected]> > --- > fs/f2fs/compress.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c > index 006a80acd1de..11c4de515f98 100644 > --- a/fs/f2fs/compress.c > +++ b/fs/f2fs/compress.c > @@ -1811,15 +1811,19 @@ static void f2fs_verify_cluster(struct work_struct > *work) > int i; > > /* Verify, update, and unlock the decompressed pages. */ > for (i = 0; i < dic->cluster_size; i++) { > struct page *rpage = dic->rpages[i]; > + struct folio *rfolio; > + size_t offset; > > if (!rpage) > continue; > + rfolio = page_folio(rpage); > + offset = folio_page_idx(rfolio, rpage) * PAGE_SIZE; > > - if (fsverity_verify_page(dic->vi, rpage)) > + if (fsverity_verify_blocks(dic->vi, rfolio, PAGE_SIZE, offset)) > SetPageUptodate(rpage); > else > ClearPageUptodate(rpage); > unlock_page(rpage);
Let me know if you'd prefer that we verified the whole folio here instead. Either way, the behavior will be still incorrect if this function is passed a large folio (which it's not). Either we'd mark the whole folio up-to-date after verifying only one page in it, or we'd access pages that were not in the array of pages passed to the function. - Eric _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
