fsverity: remove fsverity_verify_page()
Eric Biggers
maintainerv3 cover fsverity: remove fsverity_verify_page()
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
Signature · 1 line
2.53.0
Eric Biggers
maintainerPATCH v3 1/2 f2fs: make f2fs_verify_cluster() partially large-folio-aware
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.
--- fs/f2fs/compress.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-)
fs/f2fs/compress.c +5 -6
@@ -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); }
Signature · 1 line
2.53.0
Eric Biggers
maintainerPATCH v3 2/2 fsverity: remove fsverity_verify_page()
In reply to Eric BiggersNow that fsverity_verify_page() has no callers, remove it.
--- fs/verity/verify.c | 4 ++-- include/linux/fsverity.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-)
fs/verity/verify.c +2 -2
@@ -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;
include/linux/fsverity.h +0 -6
@@ -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 *
Signature · 1 line
2.53.0
Re: [PATCH v3 1/2] f2fs: make f2fs_verify_cluster() partially large-folio-aware
In reply to Eric BiggersQuoted 1 line · Eric Biggers
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..
Quoted 1 line · Eric Biggers
Now that
fsverity_verify_page()has no callers, remove it.
Looks good: