[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YekmpeQvNlGlMvNY@infradead.org>
Date: Thu, 20 Jan 2022 01:08:53 -0800
From: Christoph Hellwig <hch@...radead.org>
To: David Howells <dhowells@...hat.com>
Cc: Christoph Hellwig <hch@...radead.org>, linux-cachefs@...hat.com,
Jeff Layton <jlayton@...nel.org>,
Trond Myklebust <trondmy@...merspace.com>,
Anna Schumaker <anna.schumaker@...app.com>,
Steve French <smfrench@...il.com>,
Dominique Martinet <asmadeus@...ewreck.org>,
Matthew Wilcox <willy@...radead.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
Omar Sandoval <osandov@...ndov.com>,
JeffleXu <jefflexu@...ux.alibaba.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-afs@...ts.infradead.org, linux-nfs@...r.kernel.org,
linux-cifs@...r.kernel.org, ceph-devel@...r.kernel.org,
v9fs-developer@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/11] vfs, fscache: Add an IS_KERNEL_FILE() macro for
the S_KERNEL_FILE flag
On Wed, Jan 19, 2022 at 09:18:05AM +0000, David Howells wrote:
> The flag cannot just be dropped - it's an important part of the interaction
> with cachefilesd with regard to culling. Culling to free up space is
> offloaded to userspace rather than being done within the kernel.
>
> Previously, cachefiles, the kernel module, had to maintain a huge tree of
> records of every backing inode that it was currently using so that it could
> forbid cachefilesd to cull one when cachefilesd asked. I've reduced that to a
> single bit flag on the inode struct, thereby saving both memory and time. You
> can argue whether it's worth sacrificing an inode flag bit for that, but the
> flag can be reused for any other kernel service that wants to similarly mark
> an inode in use.
Which is a horrible interface. But you tricked Linus into merging this
crap, so let's not pretent it is a "kernel file". We have plenty of
those, basically every caller of filp_open is one.
It is something like "pinned for fscache/cachefiles", so name it that
way and add a big fat comment expaining the atrocities.
Powered by blists - more mailing lists