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:
signature.asc
Description: PGP signature