Re: [PATCH v2] man/man3/readdir.3, man/man3type/stat.3type: Improve documentation about .d_ino and .st_ino
From: Pali Rohár <pali@kernel.org>
Date: 2025-10-28 23:53:11
On Wednesday 29 October 2025 00:15:31 Alejandro Colomar wrote:
Hi Jan, Would you mind reviewing this? The thread started here: <https://lore.kernel.org/linux-man/20250525103344.fe27ugiytfyoadz5@pali/T/#u (local)>. Hi Branden, I wasn't able to do anything after your request from <https://lore.kernel.org/linux-man/20250525103344.fe27ugiytfyoadz5@pali/T/#m1bd706844fd322b2b0f9090ceac68e7ba29200eb (local)>. Pali will probably be better placed to do that, since he authored that text. Hi Pali, Sorry for being so slow with this! I wasn't able to work on this until now. Have a lovely night! Alex
Hello Branden, I'm sorry but I have not received your message because I'm not subscribed to the list. Otherwise I would have replied to you earlier. If you are referring to the "bug" then it is written in informative part in RATIONALE section of readdir / POSIX.1-2024. I wrote in my first email in that email thread which Alejandro linked above. Here is direct link to POSIX spec and below is quoted part: https://pubs.opengroup.org/onlinepubs/9799919799/functions/readdir.html "When returning a directory entry for the root of a mounted file system, some historical implementations of readdir() returned the file serial number of the underlying mount point, rather than of the root of the mounted file system. This behavior is considered to be a bug, since the underlying file serial number has no significance to applications." That part is in the "informative" section. I have not found anything in normative sections which would disallow usage of that "historical" behavior, so my understanding was that "historical" behavior is conforming too. Please correct me if I'm wrong here, or if it should be understood in different way. Also I have not read all those 4000 pages, so maybe there is something hidden. It is quite hard to find information about this topic and that is why I think this should be documented in Linux manpages. Pali