From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23689 invoked by alias); 27 Oct 2010 19:25:32 -0000 Received: (qmail 23675 invoked by uid 22791); 27 Oct 2010 19:25:31 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Oct 2010 19:25:28 +0000 From: "ppluzhnikov at google dot com" To: glibc-bugs@sources.redhat.com Subject: [Bug libc/12165] New: readdir() skips files with d_ino == 0 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppluzhnikov at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Wed, 27 Oct 2010 19:25:00 -0000 Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2010-10/txt/msg00174.txt.bz2 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.