Re: [PATCH] fs: hide file and bfile caches behind runtime const machinery
From: Mateusz Guzik
Date: Mon Apr 06 2026 - 17:45:39 EST
On Mon, Apr 6, 2026 at 11:13 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> On Sat, Mar 28, 2026 at 06:37:28PM +0100, Mateusz Guzik wrote:
>
> > -static struct kmem_cache *filp_cachep __ro_after_init;
> > -static struct kmem_cache *bfilp_cachep __ro_after_init;
> > +static struct kmem_cache *__filp_cache __ro_after_init;
> > +#define filp_cache runtime_const_ptr(__filp_cache)
> > +static struct kmem_cache *__bfilp_cache __ro_after_init;
> > +#define bfilp_cache runtime_const_ptr(__bfilp_cache)
>
> IMO the entire runtime_const_ptr thing for caches is wrong;
> statically allocated kmem_cache series got stalled, but I'm
> bringing it back next cycle and this stuff is going to get
> reverted as part of that.
I'm not going to spend time arguing about this. Given the
aforementioned direction I'm going to refrain from patching up more
caches though.