[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug#369822: ls -i stats unnecessarily
From: |
Jim Meyering |
Subject: |
Re: Bug#369822: ls -i stats unnecessarily |
Date: |
Fri, 02 Jun 2006 19:05:18 +0200 |
Ian Jackson <address@hidden> wrote:
> Ian Jackson writes ("Re: Bug#369822: ls -i stats unnecessarily"):
>> There are I think two approaches to this problem:
>> * find a list of mountpoints in some system-specific way
>> for each one stat mountpoint/..
>> compare device and inode with those of the directory we're readdir'ing
>> * provide an option to allow the user to specify that they don't
>> mind the inode numbers of mountpoints being wrong
>
> Someone has just pointed out to me that no matter what you do, you
> don't get the dev for the covering filesystem. So returning the inum
> of the root of the covering fs is definitely wrong and should never be
> done.
>
> Think about it: if you ls -i anywhere near a mount point you're
> _inevitably_ going to get useless data because the output doesn't
> contain devs. So anyone who does ls -i usefully must know that there
> are no mountpoints and this whole issue can be ignored.
I still think we'll need an option.
Otherwise (with the current/trunk optimization), for each of these special
directories, ls -i reports different inode numbers depending on whether
it appears as a command line argument (in which case, ls must lstat
(or stat) it) or it is encountered as an entry in some other directory.
Besides, from a portability standpoint, GNU ls -i should continue to
work the same way it always has, wrt mount points: print what is usually
a `2' for each of them.
- Re: Bug#369822: ls -i stats unnecessarily, Jim Meyering, 2006/06/01
- Re: Bug#369822: ls -i stats unnecessarily, Jim Meyering, 2006/06/01
- Re: Bug#369822: ls -i stats unnecessarily, James Youngman, 2006/06/01
- Re: Bug#369822: ls -i stats unnecessarily, Jim Meyering, 2006/06/02
- Re: Bug#369822: ls -i stats unnecessarily, Paul Eggert, 2006/06/03
- Re: Bug#369822: ls -i stats unnecessarily, Ian Jackson, 2006/06/05
- Re: Bug#369822: ls -i stats unnecessarily, Paul Eggert, 2006/06/05