findutils-patches
[Top][All Lists]
Advanced

[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 17:35:21 +0100

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 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.

On a related note, I still expect to fix ls -i not to print bogus numbers:

    Subject: making GNU ls -i (--inode) work around the linux readdir bug
    http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14020

For example,

    $ cd / && ls -1i |grep ' [hrt]$'
     729089 h
    3432450 r
     483331 t
    $ ls -1id h r t
       2 h
       2 r
    6830 t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]