From 6feab772ca9b9fb41a2e4047b753e01bf6f49d9e Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Thu, 25 Sep 2014 06:36:14 +0000 Subject: [PATCH] [NTFS] Compute index record size on mount and save it. svn path=/trunk/; revision=64265 --- reactos/drivers/filesystems/ntfs/fsctl.c | 4 ++++ reactos/drivers/filesystems/ntfs/ntfs.h | 1 + 2 files changed, 5 insertions(+) diff --git a/reactos/drivers/filesystems/ntfs/fsctl.c b/reactos/drivers/filesystems/ntfs/fsctl.c index e3e20f0c040..82356785920 100644 --- a/reactos/drivers/filesystems/ntfs/fsctl.c +++ b/reactos/drivers/filesystems/ntfs/fsctl.c @@ -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); diff --git a/reactos/drivers/filesystems/ntfs/ntfs.h b/reactos/drivers/filesystems/ntfs/ntfs.h index 3782c011a86..c21a0a10cd9 100644 --- a/reactos/drivers/filesystems/ntfs/ntfs.h +++ b/reactos/drivers/filesystems/ntfs/ntfs.h @@ -63,6 +63,7 @@ typedef struct _NTFS_INFO ULARGE_INTEGER MftStart; ULARGE_INTEGER MftMirrStart; ULONG BytesPerFileRecord; + ULONG BytesPerIndexRecord; ULONGLONG SerialNumber; USHORT VolumeLabelLength;