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]

 



Thanks a lot Amir, for making time for this despite the holiday season!!

Great to know, we have a fix for this.

Prince, if you can, please provide Tested-by.
> I would love to validate the changes. Although I haven't built or validated the kernel changes before, so would require some help here.

Could you please help with some basic questions?
(a) Do we need to build the complete kernel code or just fuse drivers?
(b) I see there is documentation to build the source code - but it's
too vast. Could you please point to the specific section which I need
to follow?
(c) Can we build the kernel-source code and deploy it as a docker container?
(d) Please provide any other information which you feel important to
test for newcomers like me.

Thanks again for the help here, Happy holidays!!

Regards,
Prince Kumar.



On Tue, Dec 31, 2024 at 9:39 PM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> 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