public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] fsverity: remove fsverity_verify_page()
@ 2026-02-15  4:28 Eric Biggers
  2026-02-15  4:28 ` [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
  2026-02-15  4:28 ` [PATCH v3 2/2] fsverity: remove fsverity_verify_page() Eric Biggers
  0 siblings, 2 replies; 5+ messages in thread
From: Eric Biggers @ 2026-02-15  4:28 UTC (permalink / raw)
  To: fsverity
  Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
	Chao Yu, Matthew Wilcox, Eric Biggers

This series removes the non-large-folio-aware function
fsverity_verify_page(), which is no longer needed.

Changed in v3:
    - Additional scope creep: verify the entire folio, switched to
      several more folio functions, and stop clearing PG_uptodate

Changed in v2:
    - Made one specific part of f2fs_verify_cluster() large-folio-aware

Eric Biggers (2):
  f2fs: make f2fs_verify_cluster() partially large-folio-aware
  fsverity: remove fsverity_verify_page()

 fs/f2fs/compress.c       | 11 +++++------
 fs/verity/verify.c       |  4 ++--
 include/linux/fsverity.h |  6 ------
 3 files changed, 7 insertions(+), 14 deletions(-)


base-commit: 64275e9fda3702bfb5ab3b95f7c2b9b414667164
-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware
  2026-02-15  4:28 [PATCH v3 0/2] fsverity: remove fsverity_verify_page() Eric Biggers
@ 2026-02-15  4:28 ` Eric Biggers
  2026-02-17  6:28   ` Christoph Hellwig
  2026-02-15  4:28 ` [PATCH v3 2/2] fsverity: remove fsverity_verify_page() Eric Biggers
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Biggers @ 2026-02-15  4:28 UTC (permalink / raw)
  To: fsverity
  Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
	Chao Yu, Matthew Wilcox, Eric Biggers

f2fs_verify_cluster() is the only remaining caller of the
non-large-folio-aware function fsverity_verify_page().   To unblock the
removal of that function, change f2fs_verify_cluster() to verify the
entire folio of each page and mark it up-to-date.

Note that this doesn't actually make f2fs_verify_cluster()
large-folio-aware, as it is still passed an array of pages.

In addition, remove the unnecessary clearing of the up-to-date flag.
It's guaranteed to already be clear.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 fs/f2fs/compress.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 006a80acd1de..8c76400ba631 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1811,19 +1811,18 @@ 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;
 
 		if (!rpage)
 			continue;
-
-		if (fsverity_verify_page(dic->vi, rpage))
-			SetPageUptodate(rpage);
-		else
-			ClearPageUptodate(rpage);
-		unlock_page(rpage);
+		rfolio = page_folio(rpage);
+		if (fsverity_verify_folio(dic->vi, rfolio))
+			folio_mark_uptodate(rfolio);
+		folio_unlock(rfolio);
 	}
 
 	f2fs_put_dic(dic, true);
 }
 
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/2] fsverity: remove fsverity_verify_page()
  2026-02-15  4:28 [PATCH v3 0/2] fsverity: remove fsverity_verify_page() Eric Biggers
  2026-02-15  4:28 ` [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
@ 2026-02-15  4:28 ` Eric Biggers
  2026-02-17  6:29   ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Eric Biggers @ 2026-02-15  4:28 UTC (permalink / raw)
  To: fsverity
  Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
	Chao Yu, Matthew Wilcox, Eric Biggers

Now that fsverity_verify_page() has no callers, remove it.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
 fs/verity/verify.c       | 4 ++--
 include/linux/fsverity.h | 6 ------
 2 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/fs/verity/verify.c b/fs/verity/verify.c
index 31797f9b24d0..3e38749fbc82 100644
--- a/fs/verity/verify.c
+++ b/fs/verity/verify.c
@@ -431,12 +431,12 @@ EXPORT_SYMBOL_GPL(fsverity_verify_blocks);
  * verification, then bio->bi_status is set to an error status.
  *
  * This is a helper function for use by the ->readahead() method of filesystems
  * that issue bios to read data directly into the page cache.  Filesystems that
  * populate the page cache without issuing bios (e.g. non block-based
- * filesystems) must instead call fsverity_verify_page() directly on each page.
- * All filesystems must also call fsverity_verify_page() on holes.
+ * filesystems) must instead call fsverity_verify_blocks() directly.  All
+ * filesystems must also call fsverity_verify_blocks() on holes.
  */
 void fsverity_verify_bio(struct fsverity_info *vi, struct bio *bio)
 {
 	struct fsverity_verification_context ctx;
 	struct folio_iter fi;
diff --git a/include/linux/fsverity.h b/include/linux/fsverity.h
index fed91023bea9..6de3ddf0b148 100644
--- a/include/linux/fsverity.h
+++ b/include/linux/fsverity.h
@@ -280,16 +280,10 @@ static inline bool fsverity_verify_folio(struct fsverity_info *vi,
 					 struct folio *folio)
 {
 	return fsverity_verify_blocks(vi, folio, folio_size(folio), 0);
 }
 
-static inline bool fsverity_verify_page(struct fsverity_info *vi,
-					struct page *page)
-{
-	return fsverity_verify_blocks(vi, page_folio(page), PAGE_SIZE, 0);
-}
-
 /**
  * fsverity_file_open() - prepare to open a verity file
  * @inode: the inode being opened
  * @filp: the struct file being set up
  *
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware
  2026-02-15  4:28 ` [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
@ 2026-02-17  6:28   ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2026-02-17  6:28 UTC (permalink / raw)
  To: Eric Biggers
  Cc: fsverity, linux-f2fs-devel, linux-fsdevel, Linus Torvalds,
	Jaegeuk Kim, Chao Yu, Matthew Wilcox

On Sat, Feb 14, 2026 at 08:28:05PM -0800, Eric Biggers wrote:
> In addition, remove the unnecessary clearing of the up-to-date flag.

I'd split that into a prep patch, as it is not really related to
the folio conversion.

Otherwise this looks good.  I actually had patchs to kill
fsverity_verify_page in my local queue, but decied to postpone
it.  Guess I should have included them..


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 2/2] fsverity: remove fsverity_verify_page()
  2026-02-15  4:28 ` [PATCH v3 2/2] fsverity: remove fsverity_verify_page() Eric Biggers
@ 2026-02-17  6:29   ` Christoph Hellwig
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2026-02-17  6:29 UTC (permalink / raw)
  To: Eric Biggers
  Cc: fsverity, linux-f2fs-devel, linux-fsdevel, Linus Torvalds,
	Jaegeuk Kim, Chao Yu, Matthew Wilcox

On Sat, Feb 14, 2026 at 08:28:06PM -0800, Eric Biggers wrote:
> Now that fsverity_verify_page() has no callers, remove it.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-02-17  6:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-15  4:28 [PATCH v3 0/2] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-15  4:28 ` [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
2026-02-17  6:28   ` Christoph Hellwig
2026-02-15  4:28 ` [PATCH v3 2/2] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-17  6:29   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox