Re: [fuse] Getting Unexpected Lookup entries calls after Readdirplus

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

 



Got it. Thanks Bernd, for the clarification!

[fuse] in subject - thanks for pointing out, will make sure next time onwards!

Thanks,
Prince Kumar.


On Fri, Jun 13, 2025 at 6:05 PM Bernd Schubert <bernd@xxxxxxxxxxx> wrote:
>
>
>
> On 6/12/25 17:56, Prince Kumar wrote:
> > Gentle reminder!!
>
> It would be ways more visible, if you would add [fuse] to the subject
> line. I only noticed by accident during lunch break when I scanned
> through fsdevel...
>
> >
> > -Prince.
> >
> > On Thu, Jun 5, 2025 at 2:53 PM Prince Kumar <princer@xxxxxxxxxx> wrote:
> >>
> >> Hello Team,
> >>
> >> I'm implementing Readdirplus support in GCSFuse
> >> (https://github.com/googlecloudplatform/gcsfuse) and have observed
> >> behavior that seems to contradict my understanding of its purpose.
> >>
> >> When Readdirplus returns ChildInodeEntry, I expect the kernel to use
> >> this information and avoid subsequent lookup calls for those entries.
> >> However, I'm seeing lookup calls persist for these entries unless an
> >> entry_timeout is explicitly set.
> >>
> >> One similar open issue on the libfuse github repo:
> >> https://github.com/libfuse/libfuse/issues/235, which is closed but
> >> seems un-resolved.
> >>
> >> 1. Could you confirm if this is the expected behavior, or a kernel side issue?
> >> 2. Also, is there a way other than setting entry_timeout, to suppress
> >> these lookup entries calls after the Readdirplus call?
>
> I guess the problem is that there is no readdir-plus system call.
>
> Try something like "strace -f ls -l /tmp"
>
> Results in
>
> getdents64(3, 0x6119da3c3640 /* 28 entries */, 32768) = 1768
> statx(AT_FDCWD, "/tmp/snap-private-tmp", AT_STATX_SYNC_AS_STAT|AT_SYMLINK_NOFOLLOW|AT_NO_AUTOMOUNT, STATX_MODE|STATX_NLINK|STATX_UID|STATX_GID|STATX_MTIME|STATX_SIZE, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFDIR|0700, stx_size=120, ...}) = 0
> lgetxattr("/tmp/snap-private-tmp", "security.selinux", 0x6119da3c1f40, 255) = -1 ENODATA (No data available)
>
> getdents64() eventually becomes FUSE_READDIRPLUS and libfuse returns
> the entries with their attributes. And these attributes get
> filled into the inodes.
>
> A bit later statx() is called and since there is no cache on the attributes
> it has to assume that the attributes are outdated and fetches them again.
>
> Without cache you would need a single application call, but that syscall
> does not exist.
>
>
> Hope it helps,
> Bernd
>





[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