* [PATCH v4 1/3] f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster()
2026-02-18 1:06 [PATCH v4 0/3] fsverity: remove fsverity_verify_page() Eric Biggers
@ 2026-02-18 1:06 ` Eric Biggers
2026-02-18 5:40 ` Christoph Hellwig
2026-02-18 1:06 ` [PATCH v4 2/3] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2026-02-18 1:06 UTC (permalink / raw)
To: fsverity
Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
Chao Yu, Matthew Wilcox, Eric Biggers
Remove the unnecessary clearing of PG_uptodate. It's guaranteed to
already be clear.
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/f2fs/compress.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 006a80acd1de..355762d11e25 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1817,12 +1817,10 @@ static void f2fs_verify_cluster(struct work_struct *work)
if (!rpage)
continue;
if (fsverity_verify_page(dic->vi, rpage))
SetPageUptodate(rpage);
- else
- ClearPageUptodate(rpage);
unlock_page(rpage);
}
f2fs_put_dic(dic, true);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH v4 2/3] f2fs: make f2fs_verify_cluster() partially large-folio-aware
2026-02-18 1:06 [PATCH v4 0/3] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-18 1:06 ` [PATCH v4 1/3] f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster() Eric Biggers
@ 2026-02-18 1:06 ` Eric Biggers
2026-02-18 5:40 ` Christoph Hellwig
2026-02-18 1:06 ` [PATCH v4 3/3] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-18 21:41 ` [PATCH v4 0/3] " Eric Biggers
3 siblings, 1 reply; 7+ messages in thread
From: Eric Biggers @ 2026-02-18 1:06 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. Currently,
it's never called with large folios.
Suggested-by: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
---
fs/f2fs/compress.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 355762d11e25..8c76400ba631 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1811,17 +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);
- 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] 7+ messages in thread* Re: [PATCH v4 2/3] f2fs: make f2fs_verify_cluster() partially large-folio-aware
2026-02-18 1:06 ` [PATCH v4 2/3] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
@ 2026-02-18 5:40 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-02-18 5:40 UTC (permalink / raw)
To: Eric Biggers
Cc: fsverity, linux-f2fs-devel, linux-fsdevel, Linus Torvalds,
Jaegeuk Kim, Chao Yu, Matthew Wilcox
On Tue, Feb 17, 2026 at 05:06:29PM -0800, Eric Biggers wrote:
> 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. Currently,
> it's never called with large folios.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 3/3] fsverity: remove fsverity_verify_page()
2026-02-18 1:06 [PATCH v4 0/3] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-18 1:06 ` [PATCH v4 1/3] f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster() Eric Biggers
2026-02-18 1:06 ` [PATCH v4 2/3] f2fs: make f2fs_verify_cluster() partially large-folio-aware Eric Biggers
@ 2026-02-18 1:06 ` Eric Biggers
2026-02-18 21:41 ` [PATCH v4 0/3] " Eric Biggers
3 siblings, 0 replies; 7+ messages in thread
From: Eric Biggers @ 2026-02-18 1:06 UTC (permalink / raw)
To: fsverity
Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
Chao Yu, Matthew Wilcox, Eric Biggers, Christoph Hellwig
Now that fsverity_verify_page() has no callers, remove it.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
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] 7+ messages in thread* Re: [PATCH v4 0/3] fsverity: remove fsverity_verify_page()
2026-02-18 1:06 [PATCH v4 0/3] fsverity: remove fsverity_verify_page() Eric Biggers
` (2 preceding siblings ...)
2026-02-18 1:06 ` [PATCH v4 3/3] fsverity: remove fsverity_verify_page() Eric Biggers
@ 2026-02-18 21:41 ` Eric Biggers
3 siblings, 0 replies; 7+ messages in thread
From: Eric Biggers @ 2026-02-18 21:41 UTC (permalink / raw)
To: fsverity
Cc: linux-f2fs-devel, linux-fsdevel, Linus Torvalds, Jaegeuk Kim,
Chao Yu, Matthew Wilcox
On Tue, Feb 17, 2026 at 05:06:27PM -0800, Eric Biggers wrote:
> This series removes the non-large-folio-aware function
> fsverity_verify_page(), which is no longer needed.
>
> Changed in v4:
> - Split ClearPageUptodate removal into a separate patch
>
> Changed in v3:
> - Additional scope creep: verify the entire folio, switch 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 (3):
> f2fs: remove unnecessary ClearPageUptodate in f2fs_verify_cluster()
> 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(-)
Applied to https://git.kernel.org/pub/scm/fs/fsverity/linux.git/log/?h=for-next
- Eric
^ permalink raw reply [flat|nested] 7+ messages in thread