From: "Jean-Pierre André" <jean-pierre.andre@wanadoo.fr>
To: linux-fsdevel@vger.kernel.org
Cc: fuse-devel@lists.sourceforge.net
Subject: Re: [fuse] Relevance of st_ino values
Date: Mon, 11 Feb 2019 12:18:06 +0100 [thread overview]
Message-ID: <q3rllf$sbj$1@blaine.gmane.org> (raw)
In-Reply-To: <875ztrcpkz.fsf@vostro.rath.org>
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?
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.
>
> If it is just passed through, is there a need for st_ino to match the
> "real" inode?
There is no need. Files with several names have a single st_ino
value, and a fuse inode value per path met.
Unfortunately the inode numbers are used by the kernel to index
the caches, and the caches for files with several inode numbers
are not kept in sync (long standing issue...).
>
> Background:
>
> Given that userspace has no use for inode values other than comparing
> them for equality, I would have expected that st_ino can basically be
> anything as long as there's some 1:1 mapping to kernel inodes. However,
> I have seen changes in userspace behavior when setting st_ino to the
> kernel inode (previously it was set to some other value by accident).
>
>
> Thanks!
> -Nikolaus
>
next prev parent reply other threads:[~2019-02-11 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-10 21:15 [fuse] Relevance of st_ino values Nikolaus Rath
2019-02-11 11:18 ` Jean-Pierre André [this message]
2019-02-11 15:59 ` [fuse-devel] " Miklos Szeredi
2019-02-11 20:44 ` Nikolaus Rath
2019-02-12 9:02 ` Miklos Szeredi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='q3rllf$sbj$1@blaine.gmane.org' \
--to=jean-pierre.andre@wanadoo.fr \
--cc=fuse-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).