Re: Fuse: directory cache eviction stopped working in the linux 6.9.X and onwards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 31, 2024 at 5:03 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Tue, Dec 31, 2024 at 4:36 AM Prince Kumar <princer@xxxxxxxxxx> wrote:
> >
> > Thanks Bernd for looking into this!
> >
> > I think 6.9 added passthrough support. Are you using that?
> > > Not yet, but we have plans to try this out.
> >
> > FOPEN_CACHE_DIR is default when there is no fuse-server open method
> > defined - does your implementation have an open/dir_open?
> > > Yes, here is the implementation in GCSFuse (internally uses jacobsa/fuse library) - https://github.com/GoogleCloudPlatform/gcsfuse/blob/b0ca9c5b2c0a35aeb8a48fe7a36120d7b33216aa/internal/fs/fs.go#L2328
> > Here, op.CacheDir maps to FOPEN_CACHE_DIR and op.KeepCache maps to
> > FOPEN_KEEP_CACHE.
> >
> > I think the only user of FOPEN_CACHE_DIR is in fs/fuse/readdir.c and
> > that always checks if it is set - either the flag gets set or does not
> > come into role at all, because passthrough is used?
> > > Being honest, I don't have much idea of linux source code. As a user, to me the FOPEN_CACHE_DIR flag is working as expected.
> > The problem is with the FOPEN_KEEP_CACHE flags, setting this should
> > evict the dir cache, but it's not happening for linux 6.9.x and above.
> > Although I see  a line in fs/fuse/dir.c
> > (https://github.com/torvalds/linux/blob/ccb98ccef0e543c2bd4ef1a72270461957f3d8d0/fs/fuse/dir.c#L718)
> > which invalidates the inode pages if FOPEN_KEEP_CACHE is not set.
> >
> > So my ultimate question would be:
> > (1) Do you see such recent changes in fs/fuse which explains the above
> > regression?
> > (2) If the changes are intentional, what should be the right way for
> > fuse-server to evict the dir-cache (other than auto eviction due to
> > change in dir-content, e.g., addition of new file inside a dir)?
> >
>
> Hi Prince,
>
> The change is not international.
> It is a regression due to commit
> 7de64d521bf92 ("fuse: break up fuse_open_common()") that missed the fact
> the fuse_dir_open() may need to clean the page cache.
>
> Can you test the attached fix patch?
> It is only compile tested.
> Due to holidays, I had no time to verify the fix.
>

Miklos, FYI, in case you plan to send a fixes PR,
pushed my untested patch to branch fuse-fixes in my github.

Prince, if you can, please provide Tested-by.

Thanks,
Amir.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux