ReactOS  0.4.14-dev-1007-g90d795b
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 #ifndef __REACTOS__
268  FatData.ZeroPage = ExAllocatePoolWithTag( NonPagedPoolNx, PAGE_SIZE, 'ZtaF' );
269 #else
271 #endif
272  if (FatData.ZeroPage == NULL) {
276  }
278 
279 
280  //
281  // Now initialize our general purpose spinlock (gag) and figure out how
282  // deep and wide we want our delayed lists (along with fooling ourselves
283  // about the lookaside depths).
284  //
285 
287 
288  switch ( MmQuerySystemSize() ) {
289 
290  case MmSmallSystem:
291 
292  MaxDepth = 4;
294  break;
295 
296  case MmMediumSystem:
297 
298  MaxDepth = 8;
300  break;
301 
302  case MmLargeSystem:
303  default:
304 
305  MaxDepth = 16;
307  break;
308  }
309 
310 
311  //
312  // Initialize the cache manager callback routines
313  //
314 
315  FatData.CacheManagerCallbacks.AcquireForLazyWrite = &FatAcquireFcbForLazyWrite;
316  FatData.CacheManagerCallbacks.ReleaseFromLazyWrite = &FatReleaseFcbFromLazyWrite;
317  FatData.CacheManagerCallbacks.AcquireForReadAhead = &FatAcquireFcbForReadAhead;
318  FatData.CacheManagerCallbacks.ReleaseFromReadAhead = &FatReleaseFcbFromReadAhead;
319 
324 
325  //
326  // Set up global pointer to our process.
327  //
328 
330 
331  //
332  // Setup the number of processors we support for statistics as the current number
333  // running.
334  //
335 
336 #if (NTDDI_VERSION >= NTDDI_VISTA)
338 #else
340 #endif
341 
342 
343  //
344  // Read the registry to determine if we are in ChicagoMode.
345  //
346 
350 
352 
353  if (NT_SUCCESS(Status) && FlagOn(Value, 1)) {
354 
356 
357  } else {
358 
360  }
361 
362  //
363  // Read the registry to determine if we are going to generate LFNs
364  // for valid 8.3 names with extended characters.
365  //
366 
370 
372 
373  if (NT_SUCCESS(Status) && FlagOn(Value, 1)) {
374 
376 
377  } else {
378 
380  }
381 
382  //
383  // Initialize our global resource and fire up the lookaside lists.
384  //
385 
387 
389  NULL,
390  NULL,
391 #ifndef __REACTOS__
392  POOL_NX_ALLOCATION | POOL_RAISE_IF_ALLOCATION_FAILURE,
393 #else
395 #endif
396  sizeof(IRP_CONTEXT),
398  MaxDepth );
399 
401  NULL,
402  NULL,
403 #ifndef __REACTOS__
404  POOL_NX_ALLOCATION | POOL_RAISE_IF_ALLOCATION_FAILURE,
405 #else
407 #endif
408  sizeof(NON_PAGED_FCB),
410  MaxDepth );
411 
413  NULL,
414  NULL,
415 #ifndef __REACTOS__
416  POOL_NX_ALLOCATION | POOL_RAISE_IF_ALLOCATION_FAILURE,
417 #else
419 #endif
420  sizeof(ERESOURCE),
422  MaxDepth );
423 
427 
428  //
429  // Register the file system with the I/O system
430  //
431 
436 
437  //
438  // Find out if we are running an a FujitsuFMR machine.
439  //
440 
442 
443 #if (NTDDI_VERSION >= NTDDI_WIN8)
444 
445  //
446  // Find out global disk accounting state, cache the result
447  //
448 
449  FatDiskAccountingEnabled = PsIsDiskCountersEnabled();
450 
451 #endif
452 
453  //
454  // And return to our caller
455  //
456 
457  return( STATUS_SUCCESS );
458 }
459 
460 
461 _Function_class_(DRIVER_UNLOAD)
462 VOID
463 NTAPI
464 FatUnload(
465  _In_ _Unreferenced_parameter_ PDRIVER_OBJECT DriverObject
466  )
467 
468 /*++
469 
470 Routine Description:
471 
472  This is the unload routine for the filesystem
473 
474 Arguments:
475 
476  DriverObject - Pointer to driver object created by the system.
477 
478 Return Value:
479 
480  None
481 
482 --*/
483 
484 {
486 
487 
495 }
496 
497 
498 //
499 // Local Support routine
500 //
501 
502 NTSTATUS
506  )
507 
508 /*++
509 
510 Routine Description:
511 
512  Given a unicode value name this routine will go into the registry
513  location for the Chicago compatibilitymode information and get the
514  value.
515 
516 Arguments:
517 
518  ValueName - the unicode name for the registry value located in the registry.
519  Value - a pointer to the ULONG for the result.
520 
521 Return Value:
522 
523  NTSTATUS
524 
525  If STATUS_SUCCESSFUL is returned, the location *Value will be
526  updated with the DWORD value from the registry. If any failing
527  status is returned, this value is untouched.
528 
529 --*/
530 
531 {
532  HANDLE Handle;
534  ULONG RequestLength;
539  PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
540 
542  KeyName.Length = sizeof(COMPATIBILITY_MODE_KEY_NAME) - sizeof(WCHAR);
543  KeyName.MaximumLength = sizeof(COMPATIBILITY_MODE_KEY_NAME);
544 
546  &KeyName,
548  NULL,
549  NULL);
550 
551  Status = ZwOpenKey(&Handle,
552  KEY_READ,
554 
555  if (!NT_SUCCESS(Status)) {
556 
557  return Status;
558  }
559 
560  RequestLength = KEY_WORK_AREA;
561 
562  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)Buffer;
563 
564  while (1) {
565 
566  Status = ZwQueryValueKey(Handle,
567  ValueName,
569  KeyValueInformation,
570  RequestLength,
571  &ResultLength);
572 
574 
576 
577  //
578  // Try to get a buffer big enough.
579  //
580 
581  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
582 
583  ExFreePool(KeyValueInformation);
584  }
585 
586  RequestLength += 256;
587 
588  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)
590  RequestLength,
591  ' taF');
592 
593  if (!KeyValueInformation) {
594 
595  ZwClose(Handle);
596  return STATUS_NO_MEMORY;
597  }
598 
599  } else {
600 
601  break;
602  }
603  }
604 
605  ZwClose(Handle);
606 
607  if (NT_SUCCESS(Status)) {
608 
609  if (KeyValueInformation->DataLength != 0) {
610 
611  PULONG DataPtr;
612 
613  //
614  // Return contents to the caller.
615  //
616 
617  DataPtr = (PULONG)
618  ((PUCHAR)KeyValueInformation + KeyValueInformation->DataOffset);
619  *Value = *DataPtr;
620 
621  } else {
622 
623  //
624  // Treat as if no value was found
625  //
626 
628  }
629  }
630 
631  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
632 
633  ExFreePool(KeyValueInformation);
634  }
635 
636  return Status;
637 }
638 
639 //
640 // Local Support routine
641 //
642 
643 BOOLEAN
645  )
646 
647 /*++
648 
649 Routine Description:
650 
651  This routine tells if is we running on a FujitsuFMR machine.
652 
653 Arguments:
654 
655 
656 Return Value:
657 
658  BOOLEAN - TRUE is we are and FALSE otherwise
659 
660 --*/
661 
662 {
663  BOOLEAN Result;
664  HANDLE Handle;
666  ULONG RequestLength;
672  PKEY_VALUE_FULL_INFORMATION KeyValueInformation;
673 
674  //
675  // Set default as PC/AT
676  //
677 
679  KeyName.Length = sizeof(REGISTRY_HARDWARE_DESCRIPTION_W) - sizeof(WCHAR);
680  KeyName.MaximumLength = sizeof(REGISTRY_HARDWARE_DESCRIPTION_W);
681 
683  &KeyName,
685  NULL,
686  NULL);
687 
688  Status = ZwOpenKey(&Handle,
689  KEY_READ,
691 
692  if (!NT_SUCCESS(Status)) {
693 
694  return FALSE;
695  }
696 
700 
701  RequestLength = KEY_WORK_AREA;
702 
703  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)Buffer;
704 
705  while (1) {
706 
707  Status = ZwQueryValueKey(Handle,
708  &ValueName,
710  KeyValueInformation,
711  RequestLength,
712  &ResultLength);
713 
714  // NT_ASSERT( Status != STATUS_BUFFER_OVERFLOW );
715 
717 
718  //
719  // Try to get a buffer big enough.
720  //
721 
722  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
723 
724  ExFreePool(KeyValueInformation);
725  }
726 
727  RequestLength += 256;
728 
729  KeyValueInformation = (PKEY_VALUE_FULL_INFORMATION)
730  ExAllocatePoolWithTag(PagedPool, RequestLength, ' taF');
731 
732  if (!KeyValueInformation) {
733 
734  ZwClose(Handle);
735  return FALSE;
736  }
737 
738  } else {
739 
740  break;
741  }
742  }
743 
744  ZwClose(Handle);
745 
746  if (NT_SUCCESS(Status) &&
747  (KeyValueInformation->DataLength >= sizeof(FUJITSU_FMR_NAME_W)) &&
748  (RtlCompareMemory((PUCHAR)KeyValueInformation + KeyValueInformation->DataOffset,
750  sizeof(FUJITSU_FMR_NAME_W) - sizeof(WCHAR)) ==
751  sizeof(FUJITSU_FMR_NAME_W) - sizeof(WCHAR))) {
752 
753  Result = TRUE;
754 
755  } else {
756 
757  Result = FALSE;
758  }
759 
760  if (KeyValueInformation != (PKEY_VALUE_FULL_INFORMATION)Buffer) {
761 
762  ExFreePool(KeyValueInformation);
763  }
764 
765  return Result;
766 }
767 
IN CINT OUT PVOID IN ULONG OUT PULONG ResultLength
Definition: conport.c:47
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2374
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:83
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:1697
#define TRUE
Definition: types.h:120
#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:7070
*BytesInUnicodeString PWCH UnicodeString
Definition: rtlfuncs.h:1980
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 UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
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:1706
#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:1708
PFAST_IO_UNLOCK_ALL FastIoUnlockAll
Definition: iotypes.h:1698
VOID NTAPI ObDereferenceObject(IN PVOID Object)
Definition: obref.c:375
BOOLEAN ChicagoMode
Definition: fatstruc.h:86
PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo
Definition: iotypes.h:1704
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:1707
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
Definition: iowork.c:64
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:7072
_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
PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo
Definition: iotypes.h:1694
#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
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:1699
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:503
#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:1716
PFAST_IO_LOCK FastIoLock
Definition: iotypes.h:1696
#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
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2180
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
Status
Definition: gdiplustypes.h:24
#define TAG_IRP_CONTEXT
Definition: cdprocs.h:89
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:1692
VOID NTAPI IoDeleteDevice(IN PDEVICE_OBJECT DeviceObject)
Definition: device.c:1251
DRIVER_DISPATCH * PDRIVER_DISPATCH
Definition: iotypes.h:2154
#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:1693
#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:246
ERESOURCE Resource
Definition: fatstruc.h:67
unsigned int * PULONG
Definition: retypes.h:1
PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo
Definition: iotypes.h:1695
#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:2177
PFAST_IO_MDL_WRITE_COMPLETE MdlWriteComplete
Definition: iotypes.h:1709
#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:2181
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:1691
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
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:28
#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:2938
VOID NTAPI ExDeleteNPagedLookasideList(IN PNPAGED_LOOKASIDE_LIST Lookaside)
Definition: lookas.c:174
PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush
Definition: iotypes.h:1717
BOOLEAN FatIsFujitsuFMR()
Definition: fatinit.c:644
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:1690
#define NT_ASSERT
Definition: rtlfuncs.h:3312
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: fatstruc.h:159