* Re: Improving inode number documentation
[not found] ` <20250528194105.dqc2bgfck6n3xfya@pali>
@ 2025-05-28 19:59 ` Alejandro Colomar
2025-05-28 21:31 ` [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino Alejandro Colomar
2025-10-31 10:44 ` [PATCH v3] " Alejandro Colomar
0 siblings, 2 replies; 11+ messages in thread
From: Alejandro Colomar @ 2025-05-28 19:59 UTC (permalink / raw)
To: Pali Rohár; +Cc: linux-man, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 4092 bytes --]
[CC += linux-fsdevel@]
Hi Pali,
On Wed, May 28, 2025 at 09:41:05PM +0200, Pali Rohár wrote:
> On Wednesday 28 May 2025 21:03:04 Alejandro Colomar wrote:
> > Hi Pali!
> >
> > On Wed, May 28, 2025 at 08:25:19PM +0200, Pali Rohár wrote:
> > > > > I would like to ask you, could you improve documentation about inode
> > > > > numbers returned by readdir()/getdents() and stat()/statx() functions?
> > > >
> > > > I'd love to do that. I do not feel experienced enough in this matter to
> > > > write the text myself, but I could try to learn about it. On the other
> > > > hand, if you want to send patches yourself, we can go much faster.
> > > > Would you mind sending some patches?
> > >
> > > Well, as it affects at least 7 man pages, I do not know how such
> > > information should be ideally structured. Whether to be described just
> > > in the readdir(3) and referenced from all others. Or split across all of
> > > them. So I do not think that I'm the one who can prepare patches.
> > >
> > > But I will try at least to propose how the changes could look like:
> > >
> > > readdir(3) change:
> > >
> > > d_ino - This is the inode number of the directory entry, which belongs
> > > to the filesystem st_dev of the directory on which was readdir() called.
> > > If the directory entry is the mount point then the d_ino differs from
> > > the stat's st_ino. d_ino is the inode number of the underlying mount
> > > point, rather than of the inode number of mounted file system.
> >
> > I guess the last sentence applies only as a clarification of the
> > previous one, right? If so, I'd separate the sentences with ':' instead
> > of '.'.
>
> Yes, it is a clarification.
>
> > > According
> > > to POSIX this Linux behavior is considered to be a bug but conforms as
> > > "historical implementations".
> > >
> > > stat(3type) change:
> > >
> > > st_ino - This field contains the file's inode number, which belongs to
> > > the st_dev. If the stat() was called on the mount point then st_ino
> > > differs from the readdir's d_ino. st_ino contains the inode number of
> > > mounted file system, whether readdir's d_ino contains the inode number
> > > of the underlying mount point.
> >
> > These two paragraphs in two pages sound reasonable. I've prepared a
> > patch, and pushed a new branch to the git repo where we can continue
> > working on it.
> >
> > <https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/log/?h=ino>
> >
> >
> > >
> > > So I suggest if somebody else look at it and prepare improvements
> > > including how should be this information structured.
> >
> > Here's the change I propose based on your suggestions:
> > ...
> >
> > Does it look good to you? Would you do anything else? Please sign the
> > patch if it looks good to you.
> >
> >
> > Have a lovely day!
> > Alex
> >
> > --
> > <https://www.alejandro-colomar.es/>
>
> As I said I'm not feeling comfortable with it. So I would really like if
> somebody else ideally more skilled recheck it and improve it. Maybe
> asking linux-fsdevel for help?
Sure, let's add them to CC. I will send the patches as a response to
this thread, so that they can comment. The full thread of this
discussion can be found at
<https://lore.kernel.org/linux-man/20250528194105.dqc2bgfck6n3xfya@pali/T/#t>.
>
> What is missing updating also the statx information (because this is
> also syscall which returns inode number) and updating also readdir(2)
> and getdents(2). In the first email I sent list of manpages which are
> affected. It could be quite surprising for people reading documentation
> why old stat syscall has something regarding to inodes and new statx
> syscall does not have.
We can improve it incrementally. As long as what we add is correct, we
don't need to make it perfect at once. But I'll keep it in a branch for
now, so we can iterate a bit without committing anything.
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es/>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-05-28 19:59 ` Improving inode number documentation Alejandro Colomar
@ 2025-05-28 21:31 ` Alejandro Colomar
2025-05-28 22:54 ` G. Branden Robinson
2025-10-31 10:44 ` [PATCH v3] " Alejandro Colomar
1 sibling, 1 reply; 11+ messages in thread
From: Alejandro Colomar @ 2025-05-28 21:31 UTC (permalink / raw)
To: linux-man; +Cc: Alejandro Colomar, linux-fsdevel, Pali Rohár
Suggested-by: Pali Rohár <pali@kernel.org>
Co-authored-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
---
man/man3/readdir.3 | 22 +++++++++++++++++++++-
man/man3type/stat.3type | 16 +++++++++++++++-
2 files changed, 36 insertions(+), 2 deletions(-)
diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
index b9150160b..ad9c76595 100644
--- a/man/man3/readdir.3
+++ b/man/man3/readdir.3
@@ -58,7 +58,27 @@ .SH DESCRIPTION
structure are as follows:
.TP
.I .d_ino
-This is the inode number of the file.
+This is the inode number of the file,
+which belongs to the filesystem
+.I .st_dev
+(see
+.BR stat (3type))
+of the directory on which
+.BR readdir ()
+was called.
+If the directory entry is the mount point,
+then
+.I .d_ino
+differs from
+.IR .st_ino :
+.I .d_ino
+is the inode number of the underlying mount point,
+while
+.I .st_ino
+is the inode number of the mounted file system.
+According to POSIX,
+this Linux behavior is considered to be a bug,
+but is nevertheless conforming.
.TP
.I .d_off
The value returned in
diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
index ee801bcec..835626775 100644
--- a/man/man3type/stat.3type
+++ b/man/man3type/stat.3type
@@ -66,7 +66,21 @@ .SH DESCRIPTION
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,
+which belongs to the
+.IR .st_dev .
+If
+.BR stat (2)
+was called on the mount point,
+then
+.I .d_ino
+differs from
+.IR .st_ino :
+.I .d_ino
+is the inode number of the underlying mount point,
+while
+.I .st_ino
+is the inode number of the mounted file system.
.TP
.I .st_mode
This field contains the file type and mode.
Range-diff against v0:
-: --------- > 1: c27a2d7f8 man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
--
2.49.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-05-28 21:31 ` [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino Alejandro Colomar
@ 2025-05-28 22:54 ` G. Branden Robinson
0 siblings, 0 replies; 11+ messages in thread
From: G. Branden Robinson @ 2025-05-28 22:54 UTC (permalink / raw)
To: linux-man, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]
At 2025-05-28T23:31:29+0200, Alejandro Colomar wrote:
[snip]
> diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
[snip]
> +If the directory entry is the mount point,
> +then
> +.I .d_ino
> +differs from
> +.IR .st_ino :
> +.I .d_ino
> +is the inode number of the underlying mount point,
> +while
> +.I .st_ino
> +is the inode number of the mounted file system.
> +According to POSIX,
> +this Linux behavior is considered to be a bug,
> +but is nevertheless conforming.
> .TP
> .I .d_off
> The value returned in
Can someone add a *roff comment supporting the claim in the second
sentence? For example, could we have a citation to an Austin Group
mailing list post or a ticket in the group's Mantis bug tracker?
I've followed the Austin Group mailing list for years and, to me, it
sounds uncharacteristic of the POSIX developers to decree an
implementation as "conforming but buggy".
I've checked Draft 4 (the final draft) of the 2024 standard, and see
nothing to support this claim in its dirent.h or readdir() pages.
Typically, if an implementation is "getting away with" something that
the Austin Group finds objectionable, they anticipate and give notice of
a potential change in semantics or of a planned interface removal in the
"Future Directions" sections of their entries.
It's possible I overlooked something. I used text search rather than
reading all 4,101 pages of the standard at a sitting. (I count only 9
total matches for `d_ino`; all are in the aforementioned 2 entries, or
[new to Issue 8] posix_getdents().)
There may be something analogous to the mount point situation in the
case of symbolic links, which the standard _does_ contemplate:
"The value of the [dirent] structure's _d_ino_ member shall be set to
the file serial number of the file named by the _d_name_ member. If the
_d_name_ member names a symbolic link, the value of the _d_ino_ member
shall be set to the file serial number of the symbolic link itself."
(p. 1858, lines 61297-61299)
...which leads me to wonder what an implementation--Linux,
specifically--decides the right thing is when one readdir()s a symbolic
link to a mount point.
Regards,
Branden
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-05-28 19:59 ` Improving inode number documentation Alejandro Colomar
2025-05-28 21:31 ` [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino Alejandro Colomar
@ 2025-10-31 10:44 ` Alejandro Colomar
2025-10-31 10:56 ` Jan Kara
2025-10-31 15:25 ` Darrick J. Wong
1 sibling, 2 replies; 11+ messages in thread
From: Alejandro Colomar @ 2025-10-31 10:44 UTC (permalink / raw)
To: linux-man
Cc: Alejandro Colomar, Pali Rohár, Jan Kara, G. Branden Robinson,
linux-fsdevel
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>
---
Hi Jan,
I've put your suggestions into the patch. I've also removed the
sentence about POSIX, as Pali discussed with Branden.
At the bottom of the email is the range-diff against the previous
version.
Have a lovely day!
Alex
man/man3/readdir.3 | 19 ++++++++++++++++++-
man/man3type/stat.3type | 20 +++++++++++++++++++-
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
index e1c7d2a6a..220643795 100644
--- a/man/man3/readdir.3
+++ b/man/man3/readdir.3
@@ -58,7 +58,24 @@ .SH DESCRIPTION
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
diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
index 76ee3765d..ea9acc5ec 100644
--- a/man/man3type/stat.3type
+++ b/man/man3type/stat.3type
@@ -66,7 +66,25 @@ .SH DESCRIPTION
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.
Range-diff against v2:
1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
@@ Commit message
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>
@@ man/man3/readdir.3: .SH DESCRIPTION
.TP
.I .d_ino
-This is the inode number of the file.
-+This is the inode number of the file,
-+which belongs to the filesystem
-+.I .st_dev
-+(see
-+.BR stat (3type))
-+of the directory on which
++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
-+.IR .st_ino :
++.I .st_ino
++returned by
++.BR stat (2)
++on this file:
+.I .d_ino
-+is the inode number of the underlying mount point,
++is the inode number of the mount point,
+while
+.I .st_ino
-+is the inode number of the mounted file system.
-+According to POSIX,
-+this Linux behavior is considered to be a bug,
-+but is nevertheless conforming.
++is the inode number of the root directory of the mounted filesystem.
.TP
.I .d_off
The value returned in
@@ man/man3type/stat.3type: .SH DESCRIPTION
.TP
.I .st_ino
-This field contains the file's inode number.
-+This field contains the file's inode number,
-+which belongs to the
++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 .d_ino
-+differs from
-+.IR .st_ino :
-+.I .d_ino
-+is the inode number of the underlying mount point,
-+while
+.I .st_ino
-+is the inode number of the mounted file system.
++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.
base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
--
2.51.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-10-31 10:44 ` [PATCH v3] " Alejandro Colomar
@ 2025-10-31 10:56 ` Jan Kara
2025-10-31 11:31 ` Alejandro Colomar
2025-10-31 15:25 ` Darrick J. Wong
1 sibling, 1 reply; 11+ messages in thread
From: Jan Kara @ 2025-10-31 10:56 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-man, Pali Rohár, Jan Kara, G. Branden Robinson,
linux-fsdevel
On Fri 31-10-25 11:44:14, Alejandro Colomar wrote:
> 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>
> ---
>
> Hi Jan,
>
> I've put your suggestions into the patch. I've also removed the
> sentence about POSIX, as Pali discussed with Branden.
>
> At the bottom of the email is the range-diff against the previous
> version.
Thanks! The patch looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
>
>
> Have a lovely day!
> Alex
>
> man/man3/readdir.3 | 19 ++++++++++++++++++-
> man/man3type/stat.3type | 20 +++++++++++++++++++-
> 2 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> index e1c7d2a6a..220643795 100644
> --- a/man/man3/readdir.3
> +++ b/man/man3/readdir.3
> @@ -58,7 +58,24 @@ .SH DESCRIPTION
> 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
> diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
> index 76ee3765d..ea9acc5ec 100644
> --- a/man/man3type/stat.3type
> +++ b/man/man3type/stat.3type
> @@ -66,7 +66,25 @@ .SH DESCRIPTION
> 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.
>
> Range-diff against v2:
> 1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
> @@ Commit message
>
> 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>
> @@ man/man3/readdir.3: .SH DESCRIPTION
> .TP
> .I .d_ino
> -This is the inode number of the file.
> -+This is the inode number of the file,
> -+which belongs to the filesystem
> -+.I .st_dev
> -+(see
> -+.BR stat (3type))
> -+of the directory on which
> ++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
> -+.IR .st_ino :
> ++.I .st_ino
> ++returned by
> ++.BR stat (2)
> ++on this file:
> +.I .d_ino
> -+is the inode number of the underlying mount point,
> ++is the inode number of the mount point,
> +while
> +.I .st_ino
> -+is the inode number of the mounted file system.
> -+According to POSIX,
> -+this Linux behavior is considered to be a bug,
> -+but is nevertheless conforming.
> ++is the inode number of the root directory of the mounted filesystem.
> .TP
> .I .d_off
> The value returned in
> @@ man/man3type/stat.3type: .SH DESCRIPTION
> .TP
> .I .st_ino
> -This field contains the file's inode number.
> -+This field contains the file's inode number,
> -+which belongs to the
> ++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 .d_ino
> -+differs from
> -+.IR .st_ino :
> -+.I .d_ino
> -+is the inode number of the underlying mount point,
> -+while
> +.I .st_ino
> -+is the inode number of the mounted file system.
> ++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.
>
> base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
> --
> 2.51.0
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-10-31 10:56 ` Jan Kara
@ 2025-10-31 11:31 ` Alejandro Colomar
2025-10-31 17:10 ` Pali Rohár
0 siblings, 1 reply; 11+ messages in thread
From: Alejandro Colomar @ 2025-10-31 11:31 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-man, Pali Rohár, G. Branden Robinson, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 6159 bytes --]
Hi Jan, Pali,
On Fri, Oct 31, 2025 at 11:56:19AM +0100, Jan Kara wrote:
> On Fri 31-10-25 11:44:14, Alejandro Colomar wrote:
> > 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>
> > ---
> >
> > Hi Jan,
> >
> > I've put your suggestions into the patch. I've also removed the
> > sentence about POSIX, as Pali discussed with Branden.
> >
> > At the bottom of the email is the range-diff against the previous
> > version.
>
> Thanks! The patch looks good. Feel free to add:
>
> Reviewed-by: Jan Kara <jack@suse.cz>
Thanks!
Pali, would you mind signing the patch? One you do, I'll merge.
Cheers,
Alex
>
> Honza
>
> >
> >
> > Have a lovely day!
> > Alex
> >
> > man/man3/readdir.3 | 19 ++++++++++++++++++-
> > man/man3type/stat.3type | 20 +++++++++++++++++++-
> > 2 files changed, 37 insertions(+), 2 deletions(-)
> >
> > diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> > index e1c7d2a6a..220643795 100644
> > --- a/man/man3/readdir.3
> > +++ b/man/man3/readdir.3
> > @@ -58,7 +58,24 @@ .SH DESCRIPTION
> > 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
> > diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
> > index 76ee3765d..ea9acc5ec 100644
> > --- a/man/man3type/stat.3type
> > +++ b/man/man3type/stat.3type
> > @@ -66,7 +66,25 @@ .SH DESCRIPTION
> > 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.
> >
> > Range-diff against v2:
> > 1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
> > @@ Commit message
> >
> > 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>
> > @@ man/man3/readdir.3: .SH DESCRIPTION
> > .TP
> > .I .d_ino
> > -This is the inode number of the file.
> > -+This is the inode number of the file,
> > -+which belongs to the filesystem
> > -+.I .st_dev
> > -+(see
> > -+.BR stat (3type))
> > -+of the directory on which
> > ++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
> > -+.IR .st_ino :
> > ++.I .st_ino
> > ++returned by
> > ++.BR stat (2)
> > ++on this file:
> > +.I .d_ino
> > -+is the inode number of the underlying mount point,
> > ++is the inode number of the mount point,
> > +while
> > +.I .st_ino
> > -+is the inode number of the mounted file system.
> > -+According to POSIX,
> > -+this Linux behavior is considered to be a bug,
> > -+but is nevertheless conforming.
> > ++is the inode number of the root directory of the mounted filesystem.
> > .TP
> > .I .d_off
> > The value returned in
> > @@ man/man3type/stat.3type: .SH DESCRIPTION
> > .TP
> > .I .st_ino
> > -This field contains the file's inode number.
> > -+This field contains the file's inode number,
> > -+which belongs to the
> > ++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 .d_ino
> > -+differs from
> > -+.IR .st_ino :
> > -+.I .d_ino
> > -+is the inode number of the underlying mount point,
> > -+while
> > +.I .st_ino
> > -+is the inode number of the mounted file system.
> > ++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.
> >
> > base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
> > --
> > 2.51.0
> >
> --
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-10-31 10:44 ` [PATCH v3] " Alejandro Colomar
2025-10-31 10:56 ` Jan Kara
@ 2025-10-31 15:25 ` Darrick J. Wong
2025-11-02 21:17 ` Alejandro Colomar
1 sibling, 1 reply; 11+ messages in thread
From: Darrick J. Wong @ 2025-10-31 15:25 UTC (permalink / raw)
To: Alejandro Colomar
Cc: linux-man, Pali Rohár, Jan Kara, G. Branden Robinson,
linux-fsdevel
On Fri, Oct 31, 2025 at 11:44:14AM +0100, Alejandro Colomar wrote:
> 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>
> ---
>
> Hi Jan,
>
> I've put your suggestions into the patch. I've also removed the
> sentence about POSIX, as Pali discussed with Branden.
>
> At the bottom of the email is the range-diff against the previous
> version.
>
>
> Have a lovely day!
> Alex
>
> man/man3/readdir.3 | 19 ++++++++++++++++++-
> man/man3type/stat.3type | 20 +++++++++++++++++++-
> 2 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> index e1c7d2a6a..220643795 100644
> --- a/man/man3/readdir.3
> +++ b/man/man3/readdir.3
> @@ -58,7 +58,24 @@ .SH DESCRIPTION
> 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,
nitpicking english:
"...is a mount point," ?
--D
> +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
> diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
> index 76ee3765d..ea9acc5ec 100644
> --- a/man/man3type/stat.3type
> +++ b/man/man3type/stat.3type
> @@ -66,7 +66,25 @@ .SH DESCRIPTION
> 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.
>
> Range-diff against v2:
> 1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
> @@ Commit message
>
> 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>
> @@ man/man3/readdir.3: .SH DESCRIPTION
> .TP
> .I .d_ino
> -This is the inode number of the file.
> -+This is the inode number of the file,
> -+which belongs to the filesystem
> -+.I .st_dev
> -+(see
> -+.BR stat (3type))
> -+of the directory on which
> ++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
> -+.IR .st_ino :
> ++.I .st_ino
> ++returned by
> ++.BR stat (2)
> ++on this file:
> +.I .d_ino
> -+is the inode number of the underlying mount point,
> ++is the inode number of the mount point,
> +while
> +.I .st_ino
> -+is the inode number of the mounted file system.
> -+According to POSIX,
> -+this Linux behavior is considered to be a bug,
> -+but is nevertheless conforming.
> ++is the inode number of the root directory of the mounted filesystem.
> .TP
> .I .d_off
> The value returned in
> @@ man/man3type/stat.3type: .SH DESCRIPTION
> .TP
> .I .st_ino
> -This field contains the file's inode number.
> -+This field contains the file's inode number,
> -+which belongs to the
> ++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 .d_ino
> -+differs from
> -+.IR .st_ino :
> -+.I .d_ino
> -+is the inode number of the underlying mount point,
> -+while
> +.I .st_ino
> -+is the inode number of the mounted file system.
> ++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.
>
> base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
> --
> 2.51.0
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-10-31 11:31 ` Alejandro Colomar
@ 2025-10-31 17:10 ` Pali Rohár
0 siblings, 0 replies; 11+ messages in thread
From: Pali Rohár @ 2025-10-31 17:10 UTC (permalink / raw)
To: Alejandro Colomar; +Cc: Jan Kara, linux-man, G. Branden Robinson, linux-fsdevel
On Friday 31 October 2025 12:31:41 Alejandro Colomar wrote:
> Hi Jan, Pali,
>
> On Fri, Oct 31, 2025 at 11:56:19AM +0100, Jan Kara wrote:
> > On Fri 31-10-25 11:44:14, Alejandro Colomar wrote:
> > > 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>
> > > ---
> > >
> > > Hi Jan,
> > >
> > > I've put your suggestions into the patch. I've also removed the
> > > sentence about POSIX, as Pali discussed with Branden.
> > >
> > > At the bottom of the email is the range-diff against the previous
> > > version.
> >
> > Thanks! The patch looks good. Feel free to add:
> >
> > Reviewed-by: Jan Kara <jack@suse.cz>
>
> Thanks!
>
> Pali, would you mind signing the patch? One you do, I'll merge.
Hello, yes, that this fine.
Reviewed-by: Pali Rohár <pali@kernel.org>
For future improvements, it would be nice to adjust also other manpages
which refers to inode numbers:
git grep -E '\<st_ino\>|\<stx_ino\>|\<d_ino\>'
>
> Cheers,
> Alex
>
> >
> > Honza
> >
> > >
> > >
> > > Have a lovely day!
> > > Alex
> > >
> > > man/man3/readdir.3 | 19 ++++++++++++++++++-
> > > man/man3type/stat.3type | 20 +++++++++++++++++++-
> > > 2 files changed, 37 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> > > index e1c7d2a6a..220643795 100644
> > > --- a/man/man3/readdir.3
> > > +++ b/man/man3/readdir.3
> > > @@ -58,7 +58,24 @@ .SH DESCRIPTION
> > > 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
> > > diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
> > > index 76ee3765d..ea9acc5ec 100644
> > > --- a/man/man3type/stat.3type
> > > +++ b/man/man3type/stat.3type
> > > @@ -66,7 +66,25 @@ .SH DESCRIPTION
> > > 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.
> > >
> > > Range-diff against v2:
> > > 1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
> > > @@ Commit message
> > >
> > > 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>
> > > @@ man/man3/readdir.3: .SH DESCRIPTION
> > > .TP
> > > .I .d_ino
> > > -This is the inode number of the file.
> > > -+This is the inode number of the file,
> > > -+which belongs to the filesystem
> > > -+.I .st_dev
> > > -+(see
> > > -+.BR stat (3type))
> > > -+of the directory on which
> > > ++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
> > > -+.IR .st_ino :
> > > ++.I .st_ino
> > > ++returned by
> > > ++.BR stat (2)
> > > ++on this file:
> > > +.I .d_ino
> > > -+is the inode number of the underlying mount point,
> > > ++is the inode number of the mount point,
> > > +while
> > > +.I .st_ino
> > > -+is the inode number of the mounted file system.
> > > -+According to POSIX,
> > > -+this Linux behavior is considered to be a bug,
> > > -+but is nevertheless conforming.
> > > ++is the inode number of the root directory of the mounted filesystem.
> > > .TP
> > > .I .d_off
> > > The value returned in
> > > @@ man/man3type/stat.3type: .SH DESCRIPTION
> > > .TP
> > > .I .st_ino
> > > -This field contains the file's inode number.
> > > -+This field contains the file's inode number,
> > > -+which belongs to the
> > > ++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 .d_ino
> > > -+differs from
> > > -+.IR .st_ino :
> > > -+.I .d_ino
> > > -+is the inode number of the underlying mount point,
> > > -+while
> > > +.I .st_ino
> > > -+is the inode number of the mounted file system.
> > > ++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.
> > >
> > > base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
> > > --
> > > 2.51.0
> > >
> > --
> > Jan Kara <jack@suse.com>
> > SUSE Labs, CR
>
> --
> <https://www.alejandro-colomar.es>
> Use port 80 (that is, <...:80/>).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-10-31 15:25 ` Darrick J. Wong
@ 2025-11-02 21:17 ` Alejandro Colomar
2025-11-03 11:28 ` Jan Kara
0 siblings, 1 reply; 11+ messages in thread
From: Alejandro Colomar @ 2025-11-02 21:17 UTC (permalink / raw)
To: Darrick J. Wong
Cc: linux-man, Pali Rohár, Jan Kara, G. Branden Robinson,
linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 6132 bytes --]
Hi Darrick,
On Fri, Oct 31, 2025 at 08:25:31AM -0700, Darrick J. Wong wrote:
> On Fri, Oct 31, 2025 at 11:44:14AM +0100, Alejandro Colomar wrote:
> > 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>
> > ---
> >
> > Hi Jan,
> >
> > I've put your suggestions into the patch. I've also removed the
> > sentence about POSIX, as Pali discussed with Branden.
> >
> > At the bottom of the email is the range-diff against the previous
> > version.
> >
> >
> > Have a lovely day!
> > Alex
> >
> > man/man3/readdir.3 | 19 ++++++++++++++++++-
> > man/man3type/stat.3type | 20 +++++++++++++++++++-
> > 2 files changed, 37 insertions(+), 2 deletions(-)
> >
> > diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> > index e1c7d2a6a..220643795 100644
> > --- a/man/man3/readdir.3
> > +++ b/man/man3/readdir.3
> > @@ -58,7 +58,24 @@ .SH DESCRIPTION
> > 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,
>
> nitpicking english:
>
> "...is a mount point," ?
I think you're right. Unless Jan and Pali meant something more
specific. Jan, Pali, can you please confirm?
Have a lovely night!
Alex
>
> --D
>
> > +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
> > diff --git a/man/man3type/stat.3type b/man/man3type/stat.3type
> > index 76ee3765d..ea9acc5ec 100644
> > --- a/man/man3type/stat.3type
> > +++ b/man/man3type/stat.3type
> > @@ -66,7 +66,25 @@ .SH DESCRIPTION
> > 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.
> >
> > Range-diff against v2:
> > 1: d3eeebe81 ! 1: bfa7e72ea man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
> > @@ Commit message
> >
> > 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>
> > @@ man/man3/readdir.3: .SH DESCRIPTION
> > .TP
> > .I .d_ino
> > -This is the inode number of the file.
> > -+This is the inode number of the file,
> > -+which belongs to the filesystem
> > -+.I .st_dev
> > -+(see
> > -+.BR stat (3type))
> > -+of the directory on which
> > ++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
> > -+.IR .st_ino :
> > ++.I .st_ino
> > ++returned by
> > ++.BR stat (2)
> > ++on this file:
> > +.I .d_ino
> > -+is the inode number of the underlying mount point,
> > ++is the inode number of the mount point,
> > +while
> > +.I .st_ino
> > -+is the inode number of the mounted file system.
> > -+According to POSIX,
> > -+this Linux behavior is considered to be a bug,
> > -+but is nevertheless conforming.
> > ++is the inode number of the root directory of the mounted filesystem.
> > .TP
> > .I .d_off
> > The value returned in
> > @@ man/man3type/stat.3type: .SH DESCRIPTION
> > .TP
> > .I .st_ino
> > -This field contains the file's inode number.
> > -+This field contains the file's inode number,
> > -+which belongs to the
> > ++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 .d_ino
> > -+differs from
> > -+.IR .st_ino :
> > -+.I .d_ino
> > -+is the inode number of the underlying mount point,
> > -+while
> > +.I .st_ino
> > -+is the inode number of the mounted file system.
> > ++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.
> >
> > base-commit: f305f7647d5cf62e7e764fb7a25c4926160c594f
> > --
> > 2.51.0
> >
> >
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-11-02 21:17 ` Alejandro Colomar
@ 2025-11-03 11:28 ` Jan Kara
2025-11-09 12:07 ` Alejandro Colomar
0 siblings, 1 reply; 11+ messages in thread
From: Jan Kara @ 2025-11-03 11:28 UTC (permalink / raw)
To: Alejandro Colomar
Cc: Darrick J. Wong, linux-man, Pali Rohár, Jan Kara,
G. Branden Robinson, linux-fsdevel
On Sun 02-11-25 22:17:06, Alejandro Colomar wrote:
> Hi Darrick,
>
> On Fri, Oct 31, 2025 at 08:25:31AM -0700, Darrick J. Wong wrote:
> > On Fri, Oct 31, 2025 at 11:44:14AM +0100, Alejandro Colomar wrote:
> > > 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>
> > > ---
> > >
> > > Hi Jan,
> > >
> > > I've put your suggestions into the patch. I've also removed the
> > > sentence about POSIX, as Pali discussed with Branden.
> > >
> > > At the bottom of the email is the range-diff against the previous
> > > version.
> > >
> > >
> > > Have a lovely day!
> > > Alex
> > >
> > > man/man3/readdir.3 | 19 ++++++++++++++++++-
> > > man/man3type/stat.3type | 20 +++++++++++++++++++-
> > > 2 files changed, 37 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/man/man3/readdir.3 b/man/man3/readdir.3
> > > index e1c7d2a6a..220643795 100644
> > > --- a/man/man3/readdir.3
> > > +++ b/man/man3/readdir.3
> > > @@ -58,7 +58,24 @@ .SH DESCRIPTION
> > > 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,
> >
> > nitpicking english:
> >
> > "...is a mount point," ?
>
> I think you're right. Unless Jan and Pali meant something more
> specific. Jan, Pali, can you please confirm?
Yes, Darrick is right :).
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
2025-11-03 11:28 ` Jan Kara
@ 2025-11-09 12:07 ` Alejandro Colomar
0 siblings, 0 replies; 11+ messages in thread
From: Alejandro Colomar @ 2025-11-09 12:07 UTC (permalink / raw)
To: Jan Kara
Cc: Darrick J. Wong, linux-man, Pali Rohár, G. Branden Robinson,
linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 765 bytes --]
Hi Jan, Darrick, Pali,
On Mon, Nov 03, 2025 at 12:28:21PM +0100, Jan Kara wrote:
> On Sun 02-11-25 22:17:06, Alejandro Colomar wrote:
> > On Fri, Oct 31, 2025 at 08:25:31AM -0700, Darrick J. Wong wrote:
> > > On Fri, Oct 31, 2025 at 11:44:14AM +0100, Alejandro Colomar wrote:
> > > > +If the directory entry is the mount point,
> > >
> > > nitpicking english:
> > >
> > > "...is a mount point," ?
> >
> > I think you're right. Unless Jan and Pali meant something more
> > specific. Jan, Pali, can you please confirm?
>
> Yes, Darrick is right :).
Thanks! I've amended the patch with that, added the Reviewed-by tags,
and pushed.
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es>
Use port 80 (that is, <...:80/>).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2025-11-09 12:07 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250525103344.fe27ugiytfyoadz5@pali>
[not found] ` <juxbjjsnt5mvtyctd72fcnc4o2u5wamqz7yd5occuor4clzkhx@zvob6krj6sq3>
[not found] ` <20250528182519.l6kyy5ebiivev2u5@pali>
[not found] ` <m5drckhk4mkw3l6fzfqyelobscbrmx6jefpjik4nj4j5ala7ff@mrm6ds7a4lk2>
[not found] ` <20250528194105.dqc2bgfck6n3xfya@pali>
2025-05-28 19:59 ` Improving inode number documentation Alejandro Colomar
2025-05-28 21:31 ` [RFC v1] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino Alejandro Colomar
2025-05-28 22:54 ` G. Branden Robinson
2025-10-31 10:44 ` [PATCH v3] " Alejandro Colomar
2025-10-31 10:56 ` Jan Kara
2025-10-31 11:31 ` Alejandro Colomar
2025-10-31 17:10 ` Pali Rohár
2025-10-31 15:25 ` Darrick J. Wong
2025-11-02 21:17 ` Alejandro Colomar
2025-11-03 11:28 ` Jan Kara
2025-11-09 12:07 ` Alejandro Colomar
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).