<<On Tue, 24 Oct 2017 17:40:21 +0100, Stephane Chazelas 
<stephane.chaze...@gmail.com> said:

> 2017-10-24 09:06:19 -0700, Nick Stoughton:
>> > If you are correct, this is a Linux kernel bug.
>> 
>> Why? The stat command is not standardized. The --file-system argument
>> changes the output of %i to something other than the inode ... no bug.
> [...]

> Actually, the Linux man page for statfs(2)
> (http://man7.org/linux/man-pages/man2/statfs.2.html) says:

>> Nobody knows what f_fsid is supposed to contain (but see below).

Actually, it is quite well known (just apparently not by the author of
that document).  The fsid is used to generate NFS file handles.  It's
supposed to be random and unique per file server.  (I think also it
was supposed to be hard to guess as well, but the original NFS protocol
didn't provide the sort of security guarantees that would make that
property useful.)

> And it's true POSIX doesn't seem to say what that is for. In
> any case, that would seem to confirm that that can't be used
> reliably to identify mounted file systems uniquely. The
> stat().st_dev is probably better (gstat -c %D, zstat +dev...)

Also BSD stat -f %d.

-GAWollman

Reply via email to