lkml.org 
[lkml]   [2022]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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.

    \
     
     \ /
      Last update: 2022-01-20 10:11    [W:3.165 / U:0.360 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site