This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/12165] New: readdir() skips files with d_ino == 0


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]