From: Florian Weimer <fweimer@redhat.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: Can getdents return zero inode numbers?
Date: Fri, 11 Mar 2016 22:39:54 +0100 [thread overview]
Message-ID: <56E33B2A.3080400@redhat.com> (raw)
In-Reply-To: <14BE767D-13C2-4946-B8C7-042654875E05@dilger.ca>
On 03/11/2016 10:20 PM, Andreas Dilger wrote:
> On Mar 11, 2016, at 10:34 AM, Florian Weimer <fweimer@redhat.com>
> wrote:
>>
>> Is it possible that getdents returns a zero inode number for a
>> name which actually has a file (or directory, device node etc.)
>> behind it?
>
> The d_ino == 0 value is valid to return and means that the filename
> was unlinked from the directory but the entry was not actually
> removed.
Okay, so it makes sense to skip over entries with d_ino == 0. I found
code in glibc's glob implementation which does that and was a bit
puzzled and worried that there might be Linux file systems which have
zero inode numbers (so that glob would fail on them).
Thanks,
Florian
next prev parent reply other threads:[~2016-03-11 21:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 17:34 Can getdents return zero inode numbers? Florian Weimer
2016-03-11 21:20 ` Andreas Dilger
2016-03-11 21:39 ` Florian Weimer [this message]
2016-04-08 19:40 ` Florian Weimer
2016-04-10 21:30 ` Andreas Dilger
2016-04-19 20:48 ` Eric Sandeen
2016-04-20 1:46 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56E33B2A.3080400@redhat.com \
--to=fweimer@redhat.com \
--cc=adilger@dilger.ca \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.