On Mon, Feb 11, 2019 at 12:18 PM Jean-Pierre André <jean-pierre.andre@xxxxxxxxxx> wrote: > > Nikolaus Rath wrote: > > Hello, > > > > For several requests, FUSE userspace returns a struct stat to the > > kernel. struct stat includes an st_ino field, but FUSE generally has a > > separate field for the inode (e.g. fuse_entry_param.ino vs > > fuse_entry_param.attr.st_ino). > > > > Does the kernel use the st_ino value at all, or is just passed through > > to userspace? st_ino value is not used in any way by the kernel, just passed through to userspace. > > Fuse defines its own inode number in order to track the path used > to access a file. So, when a file is recorded in several directories, > it is referenced by fuse with several inode numbers. The high level lib does this, yes. When using the lowlevel lib, it's up to the filesystem implementation: passthrough_ll uses the struct lo_inode pointer (which is specific to a certain real file) as nodeid, so no multi-caching (and related problems with consistency) in case of hard links. Thanks, Miklos