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 3398226E165; Tue, 10 Mar 2026 00:57:08 +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=1773104229; cv=none; b=VAc1RGDkEVIWSOjQxyz8Lp7rNZT3adZnuT2Cytf2HZ9QKamu4u/Hg6i5mcP/dClxpW72p6OHmQ+tL2ijQgRTBNArXjzxS7V3gJL4eDpa7IrlhmWXtaO5byOhFdT5anhG6I51+qo39hdEvpECrxYA1IQ2QRv8qLvSUfEns2OO1FI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773104229; c=relaxed/simple; bh=wz9FtTAiGZesghj7C6sS86vSlnAC0bw6p2NQrxXfpWc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QNlU7R+YyPY87SLu67mQGxLBQeyDaFUITf/BiTPb9Jftxpr0eVH5DjK5qS3Rlr+9i+9Fw1nwkIliqeIwPvKV1Cxj5zmu+Q5CnDI5472USp7k0EWOZh8p1Qqb0I1OSQ1gBTaz9TSkcEsYO2/ubDkyBDzpGtiAPltpPGKcjACdK+8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=X2DUHIdd; 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="X2DUHIdd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 928F2C4CEF7; Tue, 10 Mar 2026 00:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773104228; bh=wz9FtTAiGZesghj7C6sS86vSlnAC0bw6p2NQrxXfpWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X2DUHIdd4HdTktdnXrVrH73GWKEILQj7xsjCIQO/YX++1DWtrf5DNumAu55sy2d0z AJxrjiVzf4AWjkPbxIxqg6fvitbgMLjU7SnCITbvPA+RYHeQUViCWoxhsgquYc6+jD 5py8ayT2Y3s8WcjcEwZOwvuLXac9y+PeOfXhpQYiyLOaVzk0DGkPeSpcZkNHkyQpif X3Ab15yAtquZA2sxOOwpXkQDR/bGVAkUfI6bfBwadyAMf8gfTVqDzM/59ZYkeEm1UE OYgrdLK62q/jDdrAh1uNTzRNp1KrcMDZac/RUeHL0Gn19g2t7LnMtlJXEkk9bdhU/e Q76tzqQ4f9O6Q== Date: Mon, 9 Mar 2026 17:57:08 -0700 From: "Darrick J. Wong" To: Andrey Albershteyn Cc: linux-xfs@vger.kernel.org, fsverity@lists.linux.dev, linux-fsdevel@vger.kernel.org, ebiggers@kernel.org, hch@lst.de, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org Subject: Re: [PATCH v4 09/25] iomap: issue readahead for fsverity merkle tree Message-ID: <20260310005708.GA6033@frogsfrogsfrogs> References: <20260309192355.176980-1-aalbersh@kernel.org> <20260309192355.176980-10-aalbersh@kernel.org> Precedence: bulk X-Mailing-List: fsverity@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260309192355.176980-10-aalbersh@kernel.org> On Mon, Mar 09, 2026 at 08:23:24PM +0100, Andrey Albershteyn wrote: > Issue reading of fsverity merkle tree on the fsverity inodes. This way > metadata will be available at I/O completion time. > > Signed-off-by: Andrey Albershteyn > --- > fs/iomap/buffered-io.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index a335a18c307f..1d9481f00b41 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -593,6 +593,9 @@ void iomap_read_folio(const struct iomap_ops *ops, > > if (iter.pos < i_size_read(iter.inode)) > ctx->vi = fsverity_get_info(iter.inode); > + if (ctx->vi) > + fsverity_readahead(ctx->vi, folio->index, > + folio_nr_pages(folio)); Initiating merkle tree readahead before you start reading in the data folios? Ok, sounds reasonable, though the old-habits disk-using part of my brain thinks "should we be allocating the merkle tree *before* the data blocks?" to improve read bandwidth usage :P Anyway we can sort through that later so Reviewed-by: "Darrick J. Wong" --D > > while ((ret = iomap_iter(&iter, ops)) > 0) > iter.status = iomap_read_folio_iter(&iter, ctx, > -- > 2.51.2 > > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F324EFCC9A5 for ; Tue, 10 Mar 2026 00:57:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: Reply-To:From:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Subject:In-Reply-To:MIME-Version:References: Message-ID:To:Date:Sender:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=TFX5LNoOZTbOnM4XGZG6FnA90c6qz4I3PKezB04eSuM=; b=CerbX20DGLGD1LmJkERg21cOh5 MDKUKt22Tq7SlzJv5z7IDxapoWW6qG+oUStPVdmctBlV95kyXTPRhNUQLwvj8uXwdn2CkF1SC2/gk YOYsiAuQVAckdMgvtR+tGJFQUNYeuVOz+kLaAsHsTBM1NvO+U+AjVTN8fAJ9tatIR5u0=; Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vzlPO-00088T-SW; Tue, 10 Mar 2026 00:57:14 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vzlPO-00088N-L3 for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Mar 2026 00:57:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ho0MMt1eerqju4OJwDiaEwk7lDv9+OEFgywuZ9OIOXM=; b=gdl559TKncfbhcmho0TUYGBCHY 6YH5/+rcFOMj/fsux+I07fgEf7IFBJeLBVIgMn0C1W50igoK3nYrFAAdGeWd6C7RIDhpE2EHmXE5S tpYlF3yMY4lXzf0zJKPDZmw8GCOnVbqpMUAQ/Z83h1Dk/cYRp+To86wvbIioz5+8KEPE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Ho0MMt1eerqju4OJwDiaEwk7lDv9+OEFgywuZ9OIOXM=; b=PXnTBmmJRJ66OKVI+B05LSZngz iGn7wc12fQIDH3FR0zfW2DMZvHGuKE0pJ2YBf4VglOND+i6elqHC5kDUR5J9HCwqTfpoi7Hz37Zmf k695M3FPKYVKGCiZdHwTH2ZqabP3d6Ly8E19gzIEkDL+GAA2MgxuxH4cDcQskhN+gXO4=; Received: from sea.source.kernel.org ([172.234.252.31]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1vzlPO-0006sU-92 for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Mar 2026 00:57:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id B1D7643BC8; Tue, 10 Mar 2026 00:57:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 928F2C4CEF7; Tue, 10 Mar 2026 00:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1773104228; bh=wz9FtTAiGZesghj7C6sS86vSlnAC0bw6p2NQrxXfpWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X2DUHIdd4HdTktdnXrVrH73GWKEILQj7xsjCIQO/YX++1DWtrf5DNumAu55sy2d0z AJxrjiVzf4AWjkPbxIxqg6fvitbgMLjU7SnCITbvPA+RYHeQUViCWoxhsgquYc6+jD 5py8ayT2Y3s8WcjcEwZOwvuLXac9y+PeOfXhpQYiyLOaVzk0DGkPeSpcZkNHkyQpif X3Ab15yAtquZA2sxOOwpXkQDR/bGVAkUfI6bfBwadyAMf8gfTVqDzM/59ZYkeEm1UE OYgrdLK62q/jDdrAh1uNTzRNp1KrcMDZac/RUeHL0Gn19g2t7LnMtlJXEkk9bdhU/e Q76tzqQ4f9O6Q== Date: Mon, 9 Mar 2026 17:57:08 -0700 To: Andrey Albershteyn Message-ID: <20260310005708.GA6033@frogsfrogsfrogs> References: <20260309192355.176980-1-aalbersh@kernel.org> <20260309192355.176980-10-aalbersh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20260309192355.176980-10-aalbersh@kernel.org> X-Headers-End: 1vzlPO-0006sU-92 Subject: Re: [f2fs-dev] [PATCH v4 09/25] iomap: issue readahead for fsverity merkle tree X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "Darrick J. Wong via Linux-f2fs-devel" Reply-To: "Darrick J. Wong" Cc: fsverity@lists.linux.dev, ebiggers@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, hch@lst.de, linux-btrfs@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Mar 09, 2026 at 08:23:24PM +0100, Andrey Albershteyn wrote: > Issue reading of fsverity merkle tree on the fsverity inodes. This way > metadata will be available at I/O completion time. > > Signed-off-by: Andrey Albershteyn > --- > fs/iomap/buffered-io.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index a335a18c307f..1d9481f00b41 100644 > --- a/fs/iomap/buffered-io.c > +++ b/fs/iomap/buffered-io.c > @@ -593,6 +593,9 @@ void iomap_read_folio(const struct iomap_ops *ops, > > if (iter.pos < i_size_read(iter.inode)) > ctx->vi = fsverity_get_info(iter.inode); > + if (ctx->vi) > + fsverity_readahead(ctx->vi, folio->index, > + folio_nr_pages(folio)); Initiating merkle tree readahead before you start reading in the data folios? Ok, sounds reasonable, though the old-habits disk-using part of my brain thinks "should we be allocating the merkle tree *before* the data blocks?" to improve read bandwidth usage :P Anyway we can sort through that later so Reviewed-by: "Darrick J. Wong" --D > > while ((ret = iomap_iter(&iter, ops)) > 0) > iter.status = iomap_read_folio_iter(&iter, ctx, > -- > 2.51.2 > > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel