From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2795534A77D for ; Wed, 26 Aug 2026 04:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787719446; cv=none; b=K0wYEACWTnFkZ2WH9EP+LOnfElVYoWVyudxIMocnSlKTqbqO860N+xsreBPsC8DoifP8sE07c9oxl8Y6giRu7oMnrmGQWvC6wKcZu9aS1lEcXqWjD1qlwqRWW44/a2UCipLq4iOY0rBkYsyLY5kW14eT36XUDAFCkOdHW97TzbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787719446; c=relaxed/simple; bh=l/39/zLIBjp97aFPaqBU4Ri0HAaRUpl//nmzfbJXWuM=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uiDB+ihJPosqxolLmmScJS0JUWX81VCRKQmwm6lYRCCyHUaZoijaGS8aiyvAQpx4zS+nLuJOcv469M1E4RdIBbPe+0cBErwZWtROrx+R8/Ul3X1zuyG3eQoSIRmjRQZjwhvcA1H7ZcQrlDDnI0XOETAAbY59NoHqVcaQOSJWons= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=lSBwEenE; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bombadil.srs.infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="lSBwEenE" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:To:From:Date:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description; bh=VwNk+20oX5Nq5ler9R2U89bGOjpSa70RVJPDevUc9r8=; b=lSBwEenE0P0nCLIF87dRSbJ7QS t3FOpFltQvZ8uuWoQGFV61ogv9vco+4yFk26YviwVB77d7lQoff0LWoriw+0f8FnKERTUJQrFaNfP UzMkRwPXsa+0uVFRtxVsfkLiuj+1tz0B7mZRgSksXckP8+VtyqTZgI19nJw1k58RpFXT8v46tlMRq uCaTf8JronxnTeEld9T/RT28ozmhvWaWa8lINvAmMUMnLSPsDZJNSZoGpo0xQGxvsTMDN3u2BJSnS wFWM2v/ICbwxUvhMK3EoV33DcOXPTNzoZ7QPK3CU+Fapn6qJlfz5ybl+zXyXFi9SVaPQcnO+5LWiB W9YptFkw==; Received: from hch by bombadil.infradead.org with local (Exim 4.99.1 #2 (Red Hat Linux)) id 1wz5Ua-00000001tWL-06Ej; Wed, 26 Aug 2026 04:44:04 +0000 Date: Tue, 25 Aug 2026 21:44:03 -0700 From: Christoph Hellwig To: Christoph Hellwig , Gao Xiang , linux-erofs@lists.ozlabs.org, LKML , Chao Yu Subject: Re: [PATCH v2] erofs: use dedicated meta inodes for file-backed mounts Message-ID: References: <20260811080852.29418-1-xiang@kernel.org> <20260811090717.29787-1-xiang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@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: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html On Thu, Aug 20, 2026 at 09:40:46PM +0800, Gao Xiang wrote: > Hi Christoph, > > On Tue, Aug 18, 2026 at 10:55:47PM -0700, Christoph Hellwig wrote: > > On Tue, Aug 11, 2026 at 05:07:17PM +0800, Gao Xiang wrote: > > > access on file-backed mounts (although I still don't think it is > > > necessary due to the EROFS immutable model). As the result, metadata > > > cache won't use the page cache of backing inodes anymore. > > > > > > The "managed cache" was originally used to cache physical compressed > > > data according to the current cache strategy and I/O patterns; since > > > file-backed mounts also need to access physical data for metadata > > > access, it's natural to reuse the managed cache for this too, providing > > > a unique inode for all physical data access. > > > > This look sane. Any reason to not use the meta inode unconditionally > > to simplify the code? > > I guess you meant avoid using bd_inode page cache? Yes. > I'm not sure if it simplifies a lot, also like fadvise(WILLNEED) to blkdev > can perform to bd_inode too so I think it can still have some benefits. This is actually an artefact of why using the bdev page cache is a bad idea, because it opens your metadata cache up to external modification and side channel attacks. > I think bd_inode page cache can be used for filesystems so maybe leave it > as-is for now, or maybe a follow-up work if it's really needed. That's how it has historically been done. We generally try to avoid it for newer designs.