Re: [PATCH] fuse: respect FOPEN_KEEP_CACHE on opendir

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

 



Thanks everyone for the quick turnaround, especially Amir for the quick fix!!

Looking forward to the new release with this fix.

Regards,
Prince Kumar.





On Mon, Jan 6, 2025 at 4:01 PM Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
>
> On Wed, 1 Jan 2025 at 14:00, Amir Goldstein <amir73il@xxxxxxxxx> wrote:
> >
> > The re-factoring of fuse_dir_open() missed the need to invalidate
> > directory inode page cache with open flag FOPEN_KEEP_CACHE.
> >
> > Fixes: 7de64d521bf92 ("fuse: break up fuse_open_common()")
> > Reported-by: Prince Kumar <princer@xxxxxxxxxx>
> > Closes: https://lore.kernel.org/linux-fsdevel/CAEW=TRr7CYb4LtsvQPLj-zx5Y+EYBmGfM24SuzwyDoGVNoKm7w@xxxxxxxxxxxxxx/
> > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > ---
> >
> > Miklos,
> >
> > I verified the fix using:
> > passthrough_ll -d -o source=/src,cache=always /mnt
> >
> > and watching debug prints from repeating 'ls /mnt' invocations.
> >
> > With current upstream, dir cache is kept even though passthrough_ll
> > never sets keep_cache in opendir.
> >
> > passthrough_hp always set keep_cache together with cache_readdir,
> > so it could not have noticed this regression.
> >
> > I've modified passthrough_ll as follows to test the keep_cache flag:
> >
> >         fi->fh = (uintptr_t) d;
> > <       if (lo->cache == CACHE_ALWAYS)
> > >       if (lo->cache != CACHE_NEVER)
> >                 fi->cache_readdir = 1;
> > >       if (lo->cache == CACHE_ALWAYS)
> > >               fi->keep_cache = 1;
> >         fuse_reply_open(req, fi);
> >         return;
>
> Thanks for fixing this, Amir.
>
> Miklos





[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