From: Florian Weimer <fweimer@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>, Andreas Dilger <adilger@dilger.ca>
Cc: Linux FS Devel <linux-fsdevel@vger.kernel.org>
Subject: Re: Can getdents return zero inode numbers?
Date: Tue, 19 Apr 2016 21:46:59 -0400 [thread overview]
Message-ID: <5716DF93.9080207@redhat.com> (raw)
In-Reply-To: <57169980.50803@sandeen.net>
On 04/19/2016 04:48 PM, Eric Sandeen wrote:
>
>
> On 3/11/16 4: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.
>
> Until recently, didn't the filesystems which use get_next_ino() accept
> inode 0 as a legit inode number?
Thanks Eric for unearthing this change.
> commit 2adc376c551943a07170cbe70f43e6d6065f8906
> Author: Carlos Maiolino <cmaiolino@redhat.com>
> Date: Thu Jun 25 12:25:58 2015 -0300
>
> vfs: avoid creation of inode number 0 in get_next_ino
As far as I understand it, this does nothing to fix up existing files
with inode 0, so I filed bugs to fix this in glibc as well:
https://sourceware.org/bugzilla/show_bug.cgi?id=19970
https://sourceware.org/bugzilla/show_bug.cgi?id=19971
We had no idea on the glibc side that this wasn't just a theoretical issue.
Thanks,
Florian
prev parent reply other threads:[~2016-04-20 1:47 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
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 [this message]
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=5716DF93.9080207@redhat.com \
--to=fweimer@redhat.com \
--cc=adilger@dilger.ca \
--cc=linux-fsdevel@vger.kernel.org \
--cc=sandeen@sandeen.net \
/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.