* globals.cc (ro_u_nwfs): New R/O unicode string.
* mount.cc (fs_info::update): Check for NWFS filesystem. Set has_buggy_basic_info, if so. Add comment to explain why. (fillout_mntent): Add "nwfs" string to fs_names array. * mount.h (enum fs_info_type): Add nwfs. (class fs_info): Add has_buggy_basic_info status flag. Add accessors for has_buggy_basic_info and is_nwfs. * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Accommodate filesystems with broken FileBasicInformation handling. * path.cc (symlink_info::check): Ditto. * path.h (path_conv::has_buggy_basic_info): Add method.
This commit is contained in:
		| @@ -2260,9 +2260,16 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, | ||||
| 		} | ||||
| 	    } | ||||
| 	} | ||||
|  | ||||
|       /* Check file system while we're having the file open anyway. | ||||
| 	 This speeds up path_conv noticably (~10%). */ | ||||
|       if (!fs_update_called) | ||||
| 	fs.update (&upath, h); | ||||
|  | ||||
|       if (NT_SUCCESS (status) | ||||
| 	  && NT_SUCCESS (status | ||||
| 			 = NtQueryInformationFile (h, &io, &fbi, sizeof fbi, | ||||
| 	  && NT_SUCCESS (status = fs.has_buggy_basic_info () | ||||
| 			 ? NtQueryAttributesFile (&attr, &fbi) | ||||
| 			 : NtQueryInformationFile (h, &io, &fbi, sizeof fbi, | ||||
| 						   FileBasicInformation))) | ||||
| 	fileattr = fbi.FileAttributes; | ||||
|       else | ||||
| @@ -2359,11 +2366,6 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt, | ||||
| 	  continue; | ||||
| 	} | ||||
|  | ||||
|       /* Check file system while we're having the file open anyway. | ||||
| 	 This speeds up path_conv noticably (~10%). */ | ||||
|       if (!fs_update_called) | ||||
| 	fs.update (&upath, h); | ||||
|  | ||||
|       ext_tacked_on = !!*ext_here; | ||||
|  | ||||
|       res = -1; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user