[NTFS]
authorPierre Schweitzer <pierre@reactos.org>
Sat, 14 Feb 2015 20:55:47 +0000 (20:55 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sat, 14 Feb 2015 20:55:47 +0000 (20:55 +0000)
Query the value of NtfsMftZoneReservation on mount.
Not used yet.
CORE-8725

svn path=/trunk/; revision=66272

reactos/drivers/filesystems/ntfs/fsctl.c
reactos/drivers/filesystems/ntfs/ntfs.h

index ee3b05b..c3bf552 100644 (file)
@@ -167,6 +167,28 @@ ByeBye:
 }
 
 
+static
+ULONG
+NtfsQueryMftZoneReservation(VOID)
+{
+    ULONG ZoneReservation = 1;
+    RTL_QUERY_REGISTRY_TABLE QueryTable[2];
+
+    RtlZeroMemory(QueryTable, sizeof(QueryTable));
+    QueryTable[0].Flags = RTL_QUERY_REGISTRY_DIRECT;
+    QueryTable[0].Name = L"NtfsMftZoneReservation";
+    QueryTable[0].EntryContext = &ZoneReservation;
+
+    RtlQueryRegistryValues(RTL_REGISTRY_CONTROL,
+                           L"FileSystem",
+                           QueryTable,
+                           NULL,
+                           NULL);
+
+    return ZoneReservation;
+}
+
+
 static
 NTSTATUS
 NtfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
@@ -362,6 +384,8 @@ NtfsGetVolumeData(PDEVICE_OBJECT DeviceObject,
 
     ExFreePool(VolumeRecord);
 
+    NtfsInfo->MftZoneReservation = NtfsQueryMftZoneReservation();
+
     return Status;
 }
 
index 37ed519..44b8874 100644 (file)
@@ -75,6 +75,7 @@ typedef struct _NTFS_INFO
     UCHAR MinorVersion;
     USHORT Flags;
 
+    ULONG MftZoneReservation;
 } NTFS_INFO, *PNTFS_INFO;
 
 #define NTFS_TYPE_CCB         '20SF'