From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 019158635D; Sun, 15 Feb 2026 04:12:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771128750; cv=none; b=RVvF8Kdvx7asdlnCQZlYmfn2jyG0LfF0nHl0zUGoIl61kc0k1pXAWsicA90HGubggKc74GDd+GPpMeiOcXiWccQEA3ZuEBttPpZxgvJUoaovmNPtdjRm0Obm89GvEt1v5vNI4qgQSnk999gk21EBzeSucb5yB5tHPibwjORLXS8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771128750; c=relaxed/simple; bh=telMDwDPYXHk0p8H0dvNwmjCHle76BNL6efnVxd1yE0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=KkSMbTVE1qxz435r8rCHJSBcmZR2bDlYCPtKkanjAMSyj5pEM69QH1Hi4tf/FSDXksopcON6x1VaS+Q1Zfju/h9Sv73HF4yM1KaPU0XFGPXujSHJzueByVLracS55GjmMA+Rxexs1jp8SJgVRjYmPEMi/PhD60d+kmH1YzZeB28= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Em1nwyyZ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Em1nwyyZ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5CE5CC4CEF7; Sun, 15 Feb 2026 04:12:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1771128749; bh=telMDwDPYXHk0p8H0dvNwmjCHle76BNL6efnVxd1yE0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Em1nwyyZfplfO493edWfqF6KMKAJDtrqRdpWxquXEZ8GiawBrZxK2D8RWa5ZPgdUC rvFJOAF4YgbgWv6UWhU+BAKq0WLlcoZM5XlBjipTi5dmnnT2QCRGWNRD4iedkINvsa Ndcc6UKHw9lQgFXtdUj5oQi7cqhiXoIbNROHkdU6skhV4NIYAooQXHQnX9Su7Xp2i8 3jf3yI5ItLVXjqjZaUlVHW7SGTn6HNsKnrsKZ7P2nzOGdCbRo5aJ5UX2hBVFKu4bld 2fHdbxaX+/W/E2MNsKr8DgGikX5pmQM5tH5GrP3yV18hrcXp444KOj2/O4dsD+sfd+ q8app8lKVU8/A== Date: Sat, 14 Feb 2026 20:11:44 -0800 From: Eric Biggers To: Matthew Wilcox Cc: fsverity@lists.linux.dev, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, Linus Torvalds , Jaegeuk Kim , Chao Yu Subject: Re: [PATCH v2 1/2] f2fs: use fsverity_verify_blocks() instead of fsverity_verify_page() Message-ID: <20260215041144.GA2872@sol> References: <20260214211830.15437-1-ebiggers@kernel.org> <20260214211830.15437-2-ebiggers@kernel.org> <20260214215008.GA15997@quark> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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