All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: Alejandro Colomar <alx@kernel.org>
Cc: Jan Kara <jack@suse.cz>,
	linux-man@vger.kernel.org,
	"G. Branden Robinson" <branden@debian.org>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH v3] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
Date: Fri, 31 Oct 2025 18:10:27 +0100	[thread overview]
Message-ID: <20251031171027.nhpwrm7ih4fdkfns@pali> (raw)
In-Reply-To: <grzxwjrxlneaus735jhwh2buo2nvmj2c4iospzmh7rcfs5czel@qjlb5czusc52>

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/>).

  reply	other threads:[~2025-10-31 17:10 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-25 10:33 Improving inode number documentation Pali Rohár
2025-05-25 23:30 ` Alejandro Colomar
2025-05-28 18:25   ` Pali Rohár
2025-05-28 19:03     ` Alejandro Colomar
2025-05-28 19:41       ` Pali Rohár
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-05-28 22:54             ` G. Branden Robinson
2025-10-28 23:15           ` [PATCH v2] " Alejandro Colomar
2025-10-28 23:53             ` Pali Rohár
2025-10-29  7:00               ` G. Branden Robinson
2025-10-29 19:34                 ` Pali Rohár
2025-11-21 21:10                   ` Pali Rohár
2025-11-21 23:39                     ` G. Branden Robinson
2025-11-22  0:53                       ` Pali Rohár
2025-10-30 11:58             ` Jan Kara
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 [this message]
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

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=20251031171027.nhpwrm7ih4fdkfns@pali \
    --to=pali@kernel.org \
    --cc=alx@kernel.org \
    --cc=branden@debian.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-man@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.