The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Christoph Hellwig <hch@infradead.org>,
	Gao Xiang <xiang@kernel.org>,
	linux-erofs@lists.ozlabs.org, LKML <linux-kernel@vger.kernel.org>,
	Chao Yu <chao@kernel.org>
Subject: Re: [PATCH v2] erofs: use dedicated meta inodes for file-backed mounts
Date: Tue, 25 Aug 2026 21:44:03 -0700	[thread overview]
Message-ID: <ao5vE3v-n570dvXL@infradead.org> (raw)
In-Reply-To: <aocD3jkUnsPlrllM@XiangdeMacBook-Pro.local>

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.


  reply	other threads:[~2026-08-26  4:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-11  8:08 [PATCH] erofs: use dedicated meta inodes for file-backed mounts Gao Xiang
2026-08-11  9:07 ` [PATCH v2] " Gao Xiang
2026-08-11 11:00   ` Chao Yu
2026-08-19  5:55   ` Christoph Hellwig
2026-08-20 13:40     ` Gao Xiang
2026-08-26  4:44       ` Christoph Hellwig [this message]
2026-08-26  6:12         ` Gao Xiang

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=ao5vE3v-n570dvXL@infradead.org \
    --to=hch@infradead.org \
    --cc=chao@kernel.org \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xiang@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox