ReactOS  0.4.15-dev-1033-gd7d716a
fatinit.c
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1989-2000 Microsoft Corporation
4 
5 Module Name:
6 
7  FatInit.c
8 
9 Abstract:
10 
11  This module implements the DRIVER_INITIALIZATION routine for Fat
12 
13 
14 --*/
15 
16 #include "fatprocs.h"
17 
18 #ifdef __REACTOS__
19 #define _Unreferenced_parameter_
20 #endif
21 
22 DRIVER_INITIALIZE DriverEntry;
23 
25 NTAPI
29  );
30 
31 _Function_class_(DRIVER_UNLOAD)
32 VOID
33 NTAPI
34 FatUnload(
35  _In_ _Unreferenced_parameter_ PDRIVER_OBJECT DriverObject
36  );
37 
42  );
43 
44 BOOLEAN
46  );
47 
48 #ifdef ALLOC_PRAGMA
49 #pragma alloc_text(INIT, DriverEntry)
50 #pragma alloc_text(INIT, FatGetCompatibilityModeValue)
51 #pragma alloc_text(INIT, FatIsFujitsuFMR)
52 //#pragma alloc_text(PAGE, FatUnload)
53 #endif
54 
55 #define COMPATIBILITY_MODE_KEY_NAME L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\FileSystem"
56 #define COMPATIBILITY_MODE_VALUE_NAME L"Win31FileSystem"
57 #define CODE_PAGE_INVARIANCE_VALUE_NAME L"FatDisableCodePageInvariance"
58 
59 
60 #define KEY_WORK_AREA ((sizeof(KEY_VALUE_FULL_INFORMATION) + \
61  sizeof(ULONG)) + 64)
62 
63 #define REGISTRY_HARDWARE_DESCRIPTION_W \
64  L"\\Registry\\Machine\\Hardware\\DESCRIPTION\\System"
65 
66 #define REGISTRY_MACHINE_IDENTIFIER_W L"Identifier"
67 
68 #define FUJITSU_FMR_NAME_W L"FUJITSU FMR-"
69 
70 
71 
73 NTAPI
77  )
78 
79 /*++
80 
81 Routine Description:
82 
83  This is the initialization routine for the Fat file system
84  device driver. This routine creates the device object for the FileSystem
85  device and performs all other driver initialization.
86 
87 Arguments:
88 
89  DriverObject - Pointer to driver object created by the system.
90 
91 Return Value:
92 
93  NTSTATUS - The function value is the final status from the initialization
94  operation.
95 
96 --*/
97 
98 {
102  FS_FILTER_CALLBACKS FilterCallbacks;
104  ULONG Value;
105 
107 
108  //
109  // Create the device object for disks. To avoid problems with filters who
110  // know this name, we must keep it.
111  //
112 
115  0,
116  &UnicodeString,
118  0,
119  FALSE,
121 
122  if (!NT_SUCCESS( Status )) {
123  return Status;
124  }
125 
126  //
127  // Create the device object for "cdroms".
128  //
129 
130  RtlInitUnicodeString( &UnicodeString, L"\\FatCdrom" );
132  0,
133  &UnicodeString,
135  0,
136  FALSE,
138 
139  if (!NT_SUCCESS( Status )) {
141  return Status;
142  }
143 
144 #ifdef _MSC_VER
145 #pragma prefast( push )
146 #pragma prefast( disable:28155, "these are all correct" )
147 #pragma prefast( disable:28169, "these are all correct" )
148 #pragma prefast( disable:28175, "this is a filesystem, touching FastIoDispatch is allowed" )
149 #endif
150 
151  DriverObject->DriverUnload = FatUnload;
152 
153  //
154  // Note that because of the way data caching is done, we set neither
155  // the Direct I/O or Buffered I/O bit in DeviceObject->Flags. If
156  // data is not in the cache, or the request is not buffered, we may,
157  // set up for Direct I/O by hand.
158  //
159 
160  //
161  // Initialize the driver object with this driver's entry points.
162  //
163 
182 
184 
186 
188  FatFastIoDispatch.FastIoCheckIfPossible = FatFastIoCheckIfPossible; // CheckForFastIo
191  FatFastIoDispatch.FastIoQueryBasicInfo = FatFastQueryBasicInfo; // QueryBasicInfo
192  FatFastIoDispatch.FastIoQueryStandardInfo = FatFastQueryStdInfo; // QueryStandardInfo
193  FatFastIoDispatch.FastIoLock = FatFastLock; // Lock
194  FatFastIoDispatch.FastIoUnlockSingle = FatFastUnlockSingle; // UnlockSingle
195  FatFastIoDispatch.FastIoUnlockAll = FatFastUnlockAll; // UnlockAll
196  FatFastIoDispatch.FastIoUnlockAllByKey = FatFastUnlockAllByKey; // UnlockAllByKey
197  FatFastIoDispatch.FastIoQueryNetworkOpenInfo = FatFastQueryNetworkOpenInfo;
198  FatFastIoDispatch.AcquireForCcFlush = FatAcquireForCcFlush;
199  FatFastIoDispatch.ReleaseForCcFlush = FatReleaseForCcFlush;
204 
205 #ifdef _MSC_VER
206 #pragma prefast( pop )
207 #endif
208 
209  //
210  // Initialize the filter callbacks we use.
211  //
212 
213  RtlZeroMemory( &FilterCallbacks,
214  sizeof(FS_FILTER_CALLBACKS) );
215 
216  FilterCallbacks.SizeOfFsFilterCallbacks = sizeof(FS_FILTER_CALLBACKS);
217  FilterCallbacks.PreAcquireForSectionSynchronization = FatFilterCallbackAcquireForCreateSection;
218 
220  &FilterCallbacks );
221 
222  if (!NT_SUCCESS( Status )) {
223 
226  return Status;
227  }
228 
229  //
230  // Initialize the global data structures
231  //
232 
233  //
234  // The FatData record
235  //
236 
237  RtlZeroMemory( &FatData, sizeof(FAT_DATA));
238 
240  FatData.NodeByteSize = sizeof(FAT_DATA);
241 
243 
247 
248  //
249  // This list head keeps track of closes yet to be done.
250  //
251 
254 
256 
257  if (FatData.FatCloseItem == NULL) {
261  }
262 
263  //
264  // Allocate the zero page
265  //
266 
267  FatData.ZeroPage = ExAllocatePoolWithTag( NonPagedPoolNx, PAGE_SIZE, 'ZtaF' );
268  if (FatData.ZeroPage == NULL) {
272  }
274 
275 
276  //
277  // Now initialize our general purpose spinlock (gag) and figure out how
278  // deep and wide we want our delayed lists (along with fooling ourselves
279  // about the lookaside depths).
280  //
281 
283 
284  switch ( MmQuerySystemSize() ) {
285 
286  case MmSmallSystem:
287 
288  MaxDepth = 4;
290  break;
291 
292  case MmMediumSystem:
293 
294  MaxDepth = 8;
296  break;
297 
298  case MmLargeSystem:
299  default:
300 
301  MaxDepth = 16;
303  break;
304  }
305 
306 
307  //
308  // Initialize the cache manager callback routines
309  //
310 
311  FatData.CacheManagerCallbacks.AcquireForLazyWrite = &FatAcquireFcbForLazyWrite;
312  FatData.CacheManagerCallbacks.ReleaseFromLazyWrite = &FatReleaseFcbFromLazyWrite;
313  FatData.CacheManagerCallbacks.AcquireForReadAhead = &FatAcquireFcbForReadAhead;
314  FatData.CacheManagerCallbacks.ReleaseFromReadAhead = &FatReleaseFcbFromReadAhead;
315 
320 
321  //
322  // Set up global pointer to our process.
323  //
324 
326 
327  //
328  // Setup the number of processors we support for statistics as the current number
329  // running.
330  //
331 
332 #if (NTDDI_VERSION >= NTDDI_VISTA)
334 #else
336 #endif
337 
338 
339  //
340  // Read the registry to determine if we are in ChicagoMode.
341  //
342 
346 
348 
349  if (NT_SUCCESS(Status) && FlagOn(Value, 1)) {
350 
352 
353  } else {
354 
356  }
357 
358  //
359  // Read the registry to determine if we are going to generate LFNs
360  // for valid 8.3 names with extended characters.
361  //
362 
366 
368 
369  if (NT_SUCCESS(Status) && FlagOn(Value, 1)) {
370 
372 
373  } else {
374 
376  }
377 
378  //
379  // Initialize our global resource and fire up the lookaside lists.
380  //
381 
383 
385  NULL,
386  NULL,
388  sizeof(IRP_CONTEXT),
390  MaxDepth );
391 
393  NULL,
394  NULL,
396  sizeof(NON_PAGED_FCB),
398  MaxDepth );
399 
401  NULL,
402  NULL,
404  sizeof(ERESOURCE),
406  MaxDepth );
407 
411 
412  //
413  // Register the file system with the I/O system
414  //
415 
420 
421  //
422  // Find out if we are running an a FujitsuFMR machine.
423  //
424 
426 
427 #if (NTDDI_VERSION >= NTDDI_WIN8)
428 
429  //
430  // Find out global disk accounting state, cache the result
431  //
432 
433  FatDiskAccountingEnabled = PsIsDiskCountersEnabled();
434 
435 #endif
436 
437  //
438  // And return to our caller
439  //
440 
441  return( STATUS_SUCCESS );
442 }
443 
444 
445 _Function_class_(DRIVER_UNLOAD)
446 VOID
447 NTAPI
448 FatUnload(
449  _In_ _Unreferenced_parameter_ PDRIVER_OBJECT DriverObject
450  )
451 
452 /*++
453 
454 Routine Description:
455 
456  This is the unload routine for the filesystem
457 
458 Arguments:
459 
460  DriverObject - Pointer to driver object created by the system.
461 
462 Return Value:
463 
464  None
465 
466 --*/
467 
468 {
470 
471 
479 }
480 
481 
482 //
483 // Local Support routine
484 //
485 
486 NTSTATUS
490  )
491 
492 /*++
493 
494 Routine Description:
495 
496  Given a unicode value name this routine will go into the registry
497  location for the Chicago compatibilitymode information and get the
498  value.
499 
500 Arguments:
501 
502  ValueName - the unicode name for the registry value located in the registry.
503  Value - a pointer to the ULONG for the result.
504 
505 Return Value:
506 
507  NTSTATUS
508 
509  If STATUS_SUCCESSFUL is returned, the location *Value will be
510  updated with the DWORD value from the registry. If any failing
511  status is returned, this value is untouched.
512 
513 --*/
514 
515 {
516  HANDLE Handle;
518  ULONG RequestLength;
523  PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
524 
526  KeyName.Length = sizeof(COMPATIBILITY_MODE_KEY_NAME) - sizeof(WCHAR);
527  KeyName.MaximumLength = sizeof(COMPATIBILITY_MODE_KEY_NAME);
528 
530  &KeyName,
532  NULL,
533  NULL);
534 
535  Status = ZwOpenKey(&Handle,
536  KEY_READ,
538 
539  if (!NT_SUCCESS(Status)) {
540 
541  return Status;
542  }
543 
544  RequestLength = KEY_WORK_AREA;
545 
546  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)Buffer;
547 
548  while (1) {
549 
550  Status = ZwQueryValueKey(Handle,
551  ValueName,
553  KeyValueInformation,
554  RequestLength,
555  &ResultLength);
556 
558 
560 
561  //
562  // Try to get a buffer big enough.
563  //
564 
565  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
566 
567  ExFreePool(KeyValueInformation);
568  }
569 
570  RequestLength += 256;
571 
572  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)
574  RequestLength,
575  ' taF');
576 
577  if (!KeyValueInformation) {
578 
579  ZwClose(Handle);
580  return STATUS_NO_MEMORY;
581  }
582 
583  } else {
584 
585  break;
586  }
587  }
588 
589  ZwClose(Handle);
590 
591  if (NT_SUCCESS(Status)) {
592 
593  if (KeyValueInformation->DataLength != 0) {
594 
595  PULONG DataPtr;
596 
597  //
598  // Return contents to the caller.
599  //
600 
601  DataPtr = (PULONG)
602  ((PUCHAR)KeyValueInformation + KeyValueInformation->DataOffset);
603  *Value = *DataPtr;
604 
605  } else {
606 
607  //
608  // Treat as if no value was found
609  //
610 
612  }
613  }
614 
615  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
616 
617  ExFreePool(KeyValueInformation);
618  }
619 
620  return Status;
621 }
622 
623 //
624 // Local Support routine
625 //
626 
627 BOOLEAN
629  )
630 
631 /*++
632 
633 Routine Description:
634 
635  This routine tells us if we are running on a FujitsuFMR machine.
636 
637 Arguments:
638 
639 
640 Return Value:
641 
642  BOOLEAN - TRUE if we are and FALSE otherwise
643 
644 --*/
645 
646 {
647  BOOLEAN Result;
648  HANDLE Handle;
650  ULONG RequestLength;
656  PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
657 
658  //
659  // Set default as PC/AT
660  //
661 
663  KeyName.Length = sizeof(REGISTRY_HARDWARE_DESCRIPTION_W) - sizeof(WCHAR);
664  KeyName.MaximumLength = sizeof(REGISTRY_HARDWARE_DESCRIPTION_W);
665 
667  &KeyName,
669  NULL,
670  NULL);
671 
672  Status = ZwOpenKey(&Handle,
673  KEY_READ,
675 
676  if (!NT_SUCCESS(Status)) {
677 
678  return FALSE;
679  }
680 
684 
685  RequestLength = KEY_WORK_AREA;
686 
687  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)Buffer;
688 
689  while (1) {
690 
691  Status = ZwQueryValueKey(Handle,
692  &ValueName,
694  KeyValueInformation,
695  RequestLength,
696  &ResultLength);
697 
698  // NT_ASSERT( Status != STATUS_BUFFER_OVERFLOW );
699 
701 
702  //
703  // Try to get a buffer big enough.
704  //
705 
706  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
707 
708  ExFreePool(KeyValueInformation);
709  }
710 
711  RequestLength += 256;
712 
713  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)
714  ExAllocatePoolWithTag(PagedPool, RequestLength, ' taF');
715 
716  if (!KeyValueInformation) {
717 
718  ZwClose(Handle);
719  return FALSE;
720  }
721 
722  } else {
723 
724  break;
725  }
726  }
727 
728  ZwClose(Handle);
729 
730  if (NT_SUCCESS(Status) &&
731  (KeyValueInformation->DataLength >= sizeof(FUJITSU_FMR_NAME_W)) &&
732  (RtlCompareMemory((PUCHAR)KeyValueInformation + KeyValueInformation->DataOffset,
734  sizeof(FUJITSU_FMR_NAME_W) - sizeof(WCHAR)) ==
735  sizeof(FUJITSU_FMR_NAME_W) - sizeof(WCHAR))) {
736 
737  Result = TRUE;
738 
739  } else {
740 
741  Result = FALSE;
742  }
743 
744  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
745 
746  ExFreePool(KeyValueInformation);
747  }
748 
749  return Result;
750 }
751 
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
IN PUNICODE_STRING IN POBJECT_ATTRIBUTES ObjectAttributes
Definition: conport.c:35
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
#define TAG_FCB_NONPAGED
Definition: cdprocs.h:91
NODE_TYPE_CODE NodeTypeCode
Definition: fatstruc.h:37
#define IN
Definition: typedefs.h:39
PIO_WORKITEM FatCloseItem
Definition: fatstruc.h:144
#define KEY_WORK_AREA
PFAST_IO_UNLOCK_SINGLE FastIoUnlockSingle
Definition: iotypes.h:1704
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
PVOID CdromFileSystemDeviceObject
Definition: fatstruc.h:61
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
PVOID ZeroPage
Definition: fatstruc.h:162
ULONG SizeOfFsFilterCallbacks
Definition: iotypes.h:7077
*BytesInUnicodeString PWCH UnicodeString
Definition: rtlfuncs.h:1979
BOOLEAN FujitsuFMR
Definition: fatstruc.h:94
#define REGISTRY_MACHINE_IDENTIFIER_W
#define IRP_MJ_FLUSH_BUFFERS
#define OBJ_CASE_INSENSITIVE
Definition: winternl.h:228
USHORT MaximumLength
Definition: env_spec_w32.h:370
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: fatstruc.h:158
BOOLEAN NTAPI FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject, IN PMDL MemoryDescriptorList, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1011
PDEVICE_OBJECT FatCdromFileSystemDeviceObject
Definition: fatdata.c:59
#define IRP_MJ_SHUTDOWN
#define KEY_READ
Definition: nt_native.h:1023
#define TRUE
Definition: types.h:120
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
LOGICAL FatDiskAccountingEnabled
Definition: fatdata.c:129
BOOLEAN NTAPI FsRtlMdlWriteCompleteDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PMDL MdlChain, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1198
unsigned char * PUCHAR
Definition: retypes.h:3
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
LONG NTSTATUS
Definition: precomp.h:26
KSPIN_LOCK GeneralSpinLock
Definition: fatstruc.h:151
PFAST_IO_MDL_READ MdlRead
Definition: iotypes.h:1713
#define IRP_MJ_SET_VOLUME_INFORMATION
SLIST_HEADER FatCloseContextSList
Definition: fatdata.c:106
NTSTATUS ExInitializeResourceLite(PULONG res)
Definition: env_spec_w32.h:641
NTSTATUS NTAPI ExDeleteResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1456
ULONG FatMaxDelayedCloseCount
Definition: close.c:31
PFAST_IO_PREPARE_MDL_WRITE PrepareMdlWrite
Definition: iotypes.h:1715
PFAST_IO_UNLOCK_ALL FastIoUnlockAll
Definition: iotypes.h:1705
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
#define POOL_NX_ALLOCATION
BOOLEAN ChicagoMode
Definition: fatstruc.h:86
PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo
Definition: iotypes.h:1711
BOOLEAN NTAPI FsRtlPrepareMdlWriteDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG LockKey, OUT PMDL *MdlChain, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1272
NPAGED_LOOKASIDE_LIST FatNonPagedFcbLookasideList
Definition: fatdata.c:103
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
Definition: iowork.c:75
PFAST_IO_MDL_READ_COMPLETE MdlReadComplete
Definition: iotypes.h:1714
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
IN UCHAR Value
Definition: halp.h:394
NPAGED_LOOKASIDE_LIST FatIrpContextLookasideList
Definition: fatdata.c:102
FAST_MUTEX FatCloseQueueMutex
Definition: fatdata.c:112
#define FUJITSU_FMR_NAME_W
LIST_ENTRY DelayedCloseList
Definition: fatstruc.h:138
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
BOOLEAN CodePageInvariant
Definition: fatstruc.h:114
PFS_FILTER_CALLBACK PreAcquireForSectionSynchronization
Definition: iotypes.h:7079
_Function_class_(DRIVER_UNLOAD)
Definition: fatinit.c:31
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG NumberProcessors
Definition: fatstruc.h:80
#define FALSE
Definition: types.h:117
PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo
Definition: iotypes.h:1701
#define IRP_MJ_SET_EA
struct _FAST_IO_DISPATCH FAST_IO_DISPATCH
#define PsGetCurrentProcess
Definition: psfuncs.h:17
FORCEINLINE VOID KeInitializeSpinLock(_Out_ PKSPIN_LOCK SpinLock)
Definition: kefuncs.h:238
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
DRIVER_INITIALIZE DriverEntry
Definition: fatinit.c:22
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
Definition: bufpool.h:45
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
BOOLEAN NTAPI FatNoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: resrcsup.c:795
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
PDRIVER_OBJECT DriverObject
Definition: fatstruc.h:54
BOOLEAN NTAPI FsRtlMdlReadDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG LockKey, OUT PMDL *MdlChain, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1025
#define FILE_DEVICE_DISK_FILE_SYSTEM
Definition: winioctl.h:113
#define IRP_MJ_QUERY_EA
_In_ HANDLE Handle
Definition: extypes.h:390
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
FAT_DATA FatData
Definition: fatdata.c:56
PDEVICE_OBJECT FatDiskFileSystemDeviceObject
Definition: fatdata.c:58
VOID NTAPI ExInitializeNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside, IN PALLOCATE_FUNCTION Allocate OPTIONAL, IN PFREE_FUNCTION Free OPTIONAL, IN ULONG Flags, IN SIZE_T Size, IN ULONG Tag, IN USHORT Depth)
Definition: lookas.c:222
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
KEVENT FatReserveEvent
Definition: fatdata.c:123
#define IRP_MJ_FILE_SYSTEM_CONTROL
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
MM_SYSTEMSIZE NTAPI MmQuerySystemSize(VOID)
Definition: mmsup.c:257
#define COMPATIBILITY_MODE_KEY_NAME
PACQUIRE_FOR_LAZY_WRITE AcquireForLazyWrite
Definition: cctypes.h:39
PEPROCESS OurProcess
Definition: fatstruc.h:74
PFAST_IO_UNLOCK_ALL_BY_KEY FastIoUnlockAllByKey
Definition: iotypes.h:1706
struct _FAT_DATA FAT_DATA
NPAGED_LOOKASIDE_LIST FatEResourceLookasideList
Definition: fatdata.c:104
PACQUIRE_FOR_READ_AHEAD AcquireForReadAhead
Definition: cctypes.h:41
NTSTATUS FatGetCompatibilityModeValue(IN PUNICODE_STRING ValueName, IN OUT PULONG Value)
Definition: fatinit.c:487
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
NODE_BYTE_SIZE NodeByteSize
Definition: fatstruc.h:38
unsigned char UCHAR
Definition: xmlstorage.h:181
NTSTATUS NTAPI FsRtlRegisterFileSystemFilterCallbacks(PDRIVER_OBJECT FilterDriverObject, PFS_FILTER_CALLBACKS Callbacks)
Definition: fastio.c:1947
PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush
Definition: iotypes.h:1723
PFAST_IO_LOCK FastIoLock
Definition: iotypes.h:1703
#define TAG_ERESOURCE
Definition: nodetype.h:154
VOID NTAPI FatNoOpRelease(IN PVOID Fcb)
Definition: resrcsup.c:842
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2187
PRELEASE_FROM_READ_AHEAD ReleaseFromReadAhead
Definition: cctypes.h:42
#define PAGE_SIZE
Definition: env_spec_w32.h:49
#define COMPATIBILITY_MODE_VALUE_NAME
#define FlagOn(_F, _SF)
Definition: ext2fs.h:179
#define FAT_NTC_DATA_HEADER
Definition: nodetype.h:27
FAST_IO_DISPATCH FatFastIoDispatch
Definition: fatdata.c:96
struct _FS_FILTER_CALLBACKS FS_FILTER_CALLBACKS
NTKERNELAPI ULONG NTAPI KeQueryActiveProcessorCount(OUT PKAFFINITY ActiveProcessors OPTIONAL)
Definition: ke.c:15
CCHAR KeNumberProcessors
Definition: krnlinit.c:35
#define TAG_IRP_CONTEXT
Definition: cdprocs.h:97
LIST_ENTRY VcbQueue
Definition: fatstruc.h:48
#define _In_
Definition: no_sal2.h:204
#define CODE_PAGE_INVARIANCE_VALUE_NAME
PFAST_IO_READ FastIoRead
Definition: iotypes.h:1699
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
DRIVER_DISPATCH * PDRIVER_DISPATCH
Definition: iotypes.h:2161
#define KeInitializeEvent(pEvt, foo, foo2)
Definition: env_spec_w32.h:477
#define STATUS_OBJECT_NAME_NOT_FOUND
Definition: udferr_usr.h:149
PFAST_IO_WRITE FastIoWrite
Definition: iotypes.h:1700
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
unsigned short USHORT
Definition: pedump.c:61
#define FAT_MAX_DELAYED_CLOSES
Definition: fatdata.h:108
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
#define STATUS_NO_MEMORY
Definition: ntstatus.h:260
ERESOURCE Resource
Definition: fatstruc.h:67
unsigned int * PULONG
Definition: retypes.h:1
PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo
Definition: iotypes.h:1702
#define REGISTRY_HARDWARE_DESCRIPTION_W
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
#define IRP_MJ_READ
Definition: rdpdr.c:46
BOOLEAN NTAPI FsRtlCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:64
BOOLEAN NTAPI FsRtlCopyWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:264
VOID NTAPI IoRegisterFileSystem(IN PDEVICE_OBJECT DeviceObject)
Definition: volume.c:992
struct _FAST_IO_DISPATCH * FastIoDispatch
Definition: iotypes.h:2184
PFAST_IO_MDL_WRITE_COMPLETE MdlWriteComplete
Definition: iotypes.h:1716
#define IRP_MJ_CLEANUP
#define OUT
Definition: typedefs.h:40
#define FILE_DEVICE_CD_ROM_FILE_SYSTEM
Definition: winioctl.h:108
#define ObReferenceObject
Definition: obfuncs.h:204
#define ExInitializeSListHead
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2188
PRELEASE_FROM_LAZY_WRITE ReleaseFromLazyWrite
Definition: cctypes.h:40
ULONG ERESOURCE
Definition: env_spec_w32.h:594
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
PFAST_IO_CHECK_IF_POSSIBLE FastIoCheckIfPossible
Definition: iotypes.h:1698
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define InitializeObjectAttributes(p, n, a, r, s)
Definition: reg.c:106
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
#define POOL_RAISE_IF_ALLOCATION_FAILURE
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
LIST_ENTRY AsyncCloseList
Definition: fatstruc.h:131
return STATUS_SUCCESS
Definition: btrfs.c:3014
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:174
PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush
Definition: iotypes.h:1724
BOOLEAN FatIsFujitsuFMR()
Definition: fatinit.c:628
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 MaxDepth
Definition: acpixf.h:635
PVOID DiskFileSystemDeviceObject
Definition: fatstruc.h:60
struct _KEY_VALUE_FULL_INFORMATION * PKEY_VALUE_FULL_INFORMATION
#define ExFreePool(addr)
Definition: env_spec_w32.h:352
#define RtlCompareMemory(s1, s2, l)
Definition: env_spec_w32.h:465
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
ULONG SizeOfFastIoDispatch
Definition: iotypes.h:1697
#define NT_ASSERT
Definition: rtlfuncs.h:3312
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: fatstruc.h:159