* mount.cc (class fs_info_cache): New class to cache filesystem

information.
	(fs_info::update): Check FileFsVolumeInformation against filesystem
	cache and use it, if filesystem is already available.  Add filesystem
	to cache, if not.  Only request FileFsObjectIdInformation if
	FILE_SUPPORTS_OBJECT_IDS is set in filesystem flags.
	* ntdll.h (struct _FILE_FS_VOLUME_INFORMATION): Add pragma pack so the
	structure size is matching the OS expectations.  Add __dummy member
	used in filesystem cache.
This commit is contained in:
Corinna Vinschen
2010-09-10 10:04:28 +00:00
parent 67a9307898
commit f65c5a0a2b
3 changed files with 92 additions and 5 deletions

View File

@@ -751,14 +751,17 @@ typedef struct _FILE_FS_ATTRIBUTE_INFORMATION
WCHAR FileSystemName[1];
} FILE_FS_ATTRIBUTE_INFORMATION, *PFILE_FS_ATTRIBUTE_INFORMATION;
#pragma pack(push,4)
typedef struct _FILE_FS_VOLUME_INFORMATION
{
LARGE_INTEGER VolumeCreationTime;
ULONG VolumeSerialNumber;
ULONG VolumeLabelLength;
BOOLEAN SupportsObjects;
BOOLEAN __dummy;
WCHAR VolumeLabel[1];
} FILE_FS_VOLUME_INFORMATION, *PFILE_FS_VOLUME_INFORMATION;
#pragma pack(pop)
typedef struct _FILE_FS_SIZE_INFORMATION
{