public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12165] New: readdir() skips files with d_ino == 0
@ 2010-10-27 19:25 ppluzhnikov at google dot com
  2010-12-25 18:58 ` [Bug libc/12165] " drepper.fsp at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ppluzhnikov at google dot com @ 2010-10-27 19:25 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=12165

           Summary: readdir() skips files with d_ino == 0
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: ppluzhnikov@google.com


As far as I can tell, POSIX or the Single Unix Specification says absolutely
nothing about inode numbers (as far as d_ino == 0 meaning anything at all).

This thread: http://mail.nl.linux.org/kernelnewbies/2003-02/msg00075.html
implies that

A) d_ino == 0 is perfectly OK for a filesystem to have, and
B) there used to be a Linux kernel bug, but it has been fixed "long time ago"
in 2003, so now *really* long time ago.

We've just got a tmpfs directory, where the 32-bit d_ino overflowed and a file
with d_ino == 0 was created. This directory can't be removed, because e.g. 'rm
-rf' doesn't "see" the file -- it removes all the files it does see, then tries
to remove the directory, and gets ENOTEMPTY.

Relevant code in glibc/sysdeps/unix/readdir.c appears to be:

      /* Skip deleted files.  */
    } while (dp->d_ino == 0);

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-19 10:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-27 19:25 [Bug libc/12165] New: readdir() skips files with d_ino == 0 ppluzhnikov at google dot com
2010-12-25 18:58 ` [Bug libc/12165] " drepper.fsp at gmail dot com
2014-06-30  7:13 ` fweimer at redhat dot com
2022-09-19  6:55 ` [Bug libc/12165] readdir: Do not skip entries with zero d_ino values fweimer at redhat dot com
2022-09-19 10:06 ` fweimer at redhat dot com

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 read-only IMAP folder(s) and NNTP newsgroup(s).