Suggested-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Jan Kara <jack@suse.cz>
Cc: "G. Branden Robinson" <branden@debian.org>
Cc: <linux-fsdevel@vger.kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
structure are as follows:
.TP
.I .d_ino
-This is the inode number of the file.
+This is the inode number of the file
+in the filesystem containing
+the directory on which
+.BR readdir ()
+was called.
+If the directory entry is the mount point,
+then
+.I .d_ino
+differs from
+.I .st_ino
+returned by
+.BR stat (2)
+on this file:
+.I .d_ino
+is the inode number of the mount point,
+while
+.I .st_ino
+is the inode number of the root directory of the mounted filesystem.
.TP
.I .d_off
The value returned in
macros may be useful to decompose the device ID in this field.)
.TP
.I .st_ino
-This field contains the file's inode number.
+This field contains the file's inode number
+in the filesystem on
+.IR .st_dev .
+If
+.BR stat (2)
+was called on the mount point,
+then
+.I .st_ino
+differs from
+.I .d_ino
+returned by
+.BR readdir (3)
+for the corresponding directory entry in the parent directory.
+In this case,
+.I .st_ino
+is the inode number of the root directory of the mounted filesystem,
+while
+.I .d_ino
+is the inode number of the mount point in the parent filesystem.
.TP
.I .st_mode
This field contains the file type and mode.