delorie.com/archives/browse.cgi | search |
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: | <000701c0437d$ae8468a0$2a02a8c0@tff.ca> |
From: | "Boris Gjenero" <bgjenero AT sympatico DOT ca> |
To: | <cygwin AT sourceware DOT cygnus DOT com> |
Subject: | 1.1.4: Inconsistent i-node numbers |
Date: | Tue, 31 Oct 2000 16:01:03 -0500 |
MIME-Version: | 1.0 |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Mailer: | Microsoft Outlook Express 5.50.4133.2400 |
X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
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. BTW. Yeah, nfs-server-2.2beta47.tar compiles with a few modifications and it works. I've hacked device support into CygWin using a .DEV NT extended attribute to store the device number. I'm also going to add another attribute to store the UID and GID of a file. When that's done the NFS server should be more-or-less Unix-comatible. -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |