Compute index record size on mount and save it.

svn path=/trunk/; revision=64265
This commit is contained in:
Pierre Schweitzer 2014-09-25 06:36:14 +00:00
parent 545f0b4e64
commit 6feab772ca
2 changed files with 5 additions and 0 deletions

View file

@ -232,6 +232,10 @@ NtfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
NtfsInfo->BytesPerFileRecord = BootSector->EBPB.ClustersPerMftRecord * NtfsInfo->BytesPerCluster;
else
NtfsInfo->BytesPerFileRecord = 1 << (-BootSector->EBPB.ClustersPerMftRecord);
if (BootSector->EBPB.ClustersPerIndexRecord > 0)
NtfsInfo->BytesPerIndexRecord = BootSector->EBPB.ClustersPerIndexRecord * NtfsInfo->BytesPerCluster;
else
NtfsInfo->BytesPerIndexRecord = 1 << (-BootSector->EBPB.ClustersPerIndexRecord);
DPRINT("Boot sector information:\n");
DPRINT(" BytesPerSector: %hu\n", BootSector->BPB.BytesPerSector);

View file

@ -63,6 +63,7 @@ typedef struct _NTFS_INFO
ULARGE_INTEGER MftStart;
ULARGE_INTEGER MftMirrStart;
ULONG BytesPerFileRecord;
ULONG BytesPerIndexRecord;
ULONGLONG SerialNumber;
USHORT VolumeLabelLength;