All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: fsverity@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>
Subject: Re: [PATCH v2 1/2] f2fs: use fsverity_verify_blocks() instead of fsverity_verify_page()
Date: Sat, 14 Feb 2026 20:11:44 -0800	[thread overview]
Message-ID: <20260215041144.GA2872@sol> (raw)
In-Reply-To: <aZE_rKsOAgYqTjZ_@casper.infradead.org>

On Sun, Feb 15, 2026 at 03:38:20AM +0000, Matthew Wilcox wrote:
> On Sat, Feb 14, 2026 at 01:50:08PM -0800, Eric Biggers wrote:
> > On Sat, Feb 14, 2026 at 01:18:29PM -0800, Eric Biggers wrote:
> > > +++ 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);
> 
> Yeah, no.
> 
> 		if (fsverity_verify_blocks(dic->vi, rfolio,
> 				folio_size(rfolio), 0));
> 			folio_mark_uptodate(rfolio);
> 
> > >  		else
> > >  			ClearPageUptodate(rpage);
> 
> This never needed to be here.  The folio must already be !uptodate.
> Just delete these two lines.
> 
> > >  		unlock_page(rpage);
> 
> folio_unlock(rfolio);

Sure.  This kind of scope creep is why I wanted to just do the
straightforward conversion for now.

- Eric

WARNING: multiple messages have this Message-ID (diff)
From: Eric Biggers via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: Matthew Wilcox <willy@infradead.org>
Cc: fsverity@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org, Jaegeuk Kim <jaegeuk@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [f2fs-dev] [PATCH v2 1/2] f2fs: use fsverity_verify_blocks() instead of fsverity_verify_page()
Date: Sat, 14 Feb 2026 20:11:44 -0800	[thread overview]
Message-ID: <20260215041144.GA2872@sol> (raw)
In-Reply-To: <aZE_rKsOAgYqTjZ_@casper.infradead.org>

On Sun, Feb 15, 2026 at 03:38:20AM +0000, Matthew Wilcox wrote:
> On Sat, Feb 14, 2026 at 01:50:08PM -0800, Eric Biggers wrote:
> > On Sat, Feb 14, 2026 at 01:18:29PM -0800, Eric Biggers wrote:
> > > +++ 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);
> 
> Yeah, no.
> 
> 		if (fsverity_verify_blocks(dic->vi, rfolio,
> 				folio_size(rfolio), 0));
> 			folio_mark_uptodate(rfolio);
> 
> > >  		else
> > >  			ClearPageUptodate(rpage);
> 
> This never needed to be here.  The folio must already be !uptodate.
> Just delete these two lines.
> 
> > >  		unlock_page(rpage);
> 
> folio_unlock(rfolio);

Sure.  This kind of scope creep is why I wanted to just do the
straightforward conversion for now.

- Eric


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  reply	other threads:[~2026-02-15  4:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14 21:18 [PATCH v2 0/2] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-14 21:18 ` [f2fs-dev] " Eric Biggers via Linux-f2fs-devel
2026-02-14 21:18 ` [PATCH v2 1/2] f2fs: use fsverity_verify_blocks() instead of fsverity_verify_page() Eric Biggers
2026-02-14 21:18   ` [f2fs-dev] " Eric Biggers via Linux-f2fs-devel
2026-02-14 21:50   ` Eric Biggers
2026-02-14 21:50     ` [f2fs-dev] " Eric Biggers via Linux-f2fs-devel
2026-02-14 22:20     ` Linus Torvalds
2026-02-14 22:20       ` [f2fs-dev] " Linus Torvalds
2026-02-15  3:38     ` Matthew Wilcox
2026-02-15  3:38       ` [f2fs-dev] " Matthew Wilcox
2026-02-15  4:11       ` Eric Biggers [this message]
2026-02-15  4:11         ` Eric Biggers via Linux-f2fs-devel
2026-02-14 21:18 ` [PATCH v2 2/2] fsverity: remove fsverity_verify_page() Eric Biggers
2026-02-14 21:18   ` [f2fs-dev] " Eric Biggers via Linux-f2fs-devel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260215041144.GA2872@sol \
    --to=ebiggers@kernel.org \
    --cc=chao@kernel.org \
    --cc=fsverity@lists.linux.dev \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.