From 6afd63010691ff7a1a3caa7d96b23b1f390a719a Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 23 May 2008 17:22:18 +0000 Subject: * fhandler_disk_file.cc (fhandler_disk_file::opendir): Don't try to use FileIdBothDirectoryInformation on NFS shares. Fix comment to explain why. * path.cc (symlink_info::check): Reinstantiate no_ea. Use in erroneously changed condition. --- winsup/cygwin/fhandler_disk_file.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'winsup/cygwin/fhandler_disk_file.cc') diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index 6fa6e5374..66f1fcc3c 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -1569,19 +1569,21 @@ fhandler_disk_file::opendir (int fd) FileIdBothDirectoryInformation only on filesystems supporting persistent ACLs, FileDirectoryInformation otherwise. - On older NFS clients (up to SFU 3.5), dangling symlinks - are hidden from directory queries, unless you use the - FileNamesInformation info class. Nevertheless, we try - FileIdBothDirectoryInformation first. On newer NFS clients - it works fine, on the older ones it returns "invalid info - class". So we can stick to the above explained mechanism. */ + NFS clients hide dangling symlinks from directory queries, + unless you use the FileNamesInformation info class. + On newer NFS clients (>=Vista) FileIdBothDirectoryInformation + works fine, but only if the NFS share is mounted to a drive + letter. TODO: We don't test that here for now, but it might + be worth to test if there's a speed gain in using + FileIdBothDirectoryInformation, because it doesn't require to + open the file to read the inode number. */ if (pc.hasgood_inode ()) { dir->__flags |= dirent_set_d_ino; - if (wincap.has_fileid_dirinfo ()) - dir->__flags |= dirent_get_d_ino; if (pc.fs_is_nfs ()) dir->__flags |= dirent_nfs_d_ino; + else if (wincap.has_fileid_dirinfo ()) + dir->__flags |= dirent_get_d_ino; } } if (fd >= 0) -- cgit v1.2.3