[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Findutils-patches] [PATCH] Optimise away calls to stat if all we ne
From: |
Jim Meyering |
Subject: |
Re: [Findutils-patches] [PATCH] Optimise away calls to stat if all we need is the inode number (bug #24342). |
Date: |
Sun, 08 Mar 2009 19:27:33 +0100 |
James Youngman wrote:
> On Sun, Mar 8, 2009 at 4:35 PM, Jim Meyering <address@hidden> wrote:
>> James Youngman wrote:
>> ...
>>> +#24342: -inum predicate shoud use dirent.d_ino instead of stat.st_ino
>>> +(this is a performance bug).
>>
>> You might want to mention that dirent.d_ino values are unreliable on some
>> systems (Linux, Solaris, *BSD get it wrong, but Cygwin gets it right).
>
> The text could have perhaps been more specific there, but in our case,
> we just discard d_ino for directories, and stat them instead.
Ahh... good. Except for Cygwin.
>> The problem is with mount points. There, stat.st_ino does not always
>> match the corresponding dirent.d_ino. This is a problem even with the
>> latest Linux kernels.
>
> Yes, I'm aware of the problem.
Heh ;-)
I should have looked at the code.