delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/10/20:46:47

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <30E7BC40E838D211B3DB00104B09EFB7795394@delorean.optimation.co.nz>
From: David Sainty <David DOT Sainty AT optimation DOT co DOT nz>
To: "'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Cc: "dave @ dtsp (E-mail)" <dave AT dtsp DOT co DOT nz>
Subject: Re: 1.1.4: Inconsistent i-node numbers
Date: Mon, 11 Dec 2000 14:45:21 +1300
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)

This also affects 'zsh', which uses its own implementation of getcwd().

Perhaps this issue belongs in the FAQ?

Is there any interest in making 'zsh' a standard Cygwin distributed
application?  A patch to 'zsh' would make this problem go away, and who
really wants to use 'bash'? :)

(While I'm on the topic, ispell would be a great addition too :)

Cheers,

Dave

> From:  Christopher Faylor <cgf AT redhat DOT com>  
> 
> This is a long-standing problem in cygwin.  Using real inode numbers in
> readdir would be expensive but using hashes for everything would be
imprecise.
> 
> I've never heard of a great solution for this, unfortunately.
> 
> cgf
> 
> On Tue, Oct 31, 2000 at 04:01:03PM -0500, Boris Gjenero wrote:
> >NOTE:  I am not on the mailing list.  If you want to reach me, e-mail me.
> >
> >Stat returns Windows inode numbers on certain devices (fixed disks,
CD-ROMs,
> >etc.).  It only uses hashing if the device is not one of those or if it
> >can't open the file.   readdir always uses the filename hashing mechanism
to
> >generate the inode number.
> >
> >This means that inode numbers won't agree on certain devices like hard
disks
> >and CD-ROMs.  Of course, not a lot of software cares about i-node
numbers.
> >I discovered the bug when I compiled an NFS server and all NFS file
handles
> >were stale.
> >
> >The readdir function is in: winsup/cygwin/dir.cc
> >The stat inode handling is in the function fhandler_disk_file::fstat in
> >winsup/cygwin/fhandler.cc
> >But then if stat can't open a file it will use code in the stat_worker
> >function in winsup/cygwin/syscalls.cc
> >
> >My temporary fix is to change fhandler_disk_file::fstat so it always uses
> >hashing.  (Look around line 935 in fhandler.cc) However, this may not be
the
> >right thing to do; perhaps inodes should be used by all functions if
> >possible.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019