ReactOS  0.4.14-dev-608-gd495a4f
fatstruc.h
Go to the documentation of this file.
1 /*++
2 
3 Copyright (c) 1989-2000 Microsoft Corporation
4 
5 Module Name:
6 
7  FatStruc.h
8 
9 Abstract:
10 
11  This module defines the data structures that make up the major internal
12  part of the Fat file system.
13 
14 
15 --*/
16 
17 #ifndef _FATSTRUC_
18 #define _FATSTRUC_
19 
20 typedef PVOID PBCB; //**** Bcb's are now part of the cache module
21 
22 #ifdef __REACTOS__
23 #define __volatile volatile
24 #endif
25 
26 //
27 // The FAT_DATA record is the top record in the Fat file system in-memory
28 // data structure. This structure must be allocated from non-paged pool.
29 //
30 
31 typedef struct _FAT_DATA {
32 
33  //
34  // The type and size of this record (must be FAT_NTC_DATA_HEADER)
35  //
36 
39 
40 
42 
43 
44  //
45  // A queue of all the devices that are mounted by the file system.
46  //
47 
49 
50  //
51  // A pointer to the Driver object we were initialized with
52  //
53 
55 
56  //
57  // A pointer to the filesystem device objects we created.
58  //
59 
62 
63  //
64  // A resource variable to control access to the global Fat data record
65  //
66 
68 
69  //
70  // A pointer to our EPROCESS struct, which is a required input to the
71  // Cache Management subsystem.
72  //
73 
75 
76  //
77  // Number of processors when the driver loaded.
78  //
79 
81 
82  //
83  // The following tells us if we should use Chicago extensions.
84  //
85 
87 
88  //
89  // The following field tells us if we are running on a Fujitsu
90  // FMR Series. These machines supports extra formats on the
91  // FAT file system.
92  //
93 
95 
96  //
97  // Inidicates that FspClose is currently processing closes.
98  //
99 
101 
102  //
103  // The following BOOLEAN says shutdown has started on FAT. It
104  // instructs FspClose to not keep the Vcb resources anymore.
105  //
106 
108 
109  //
110  // The following flag tells us if we are going to generate LFNs
111  // for valid 8.3 names with extended characters.
112  //
113 
115 
116  //
117  // The following flags tell us if we are in an aggresive push to lower
118  // the size of the deferred close queues.
119  //
120 
123 
124 
125  //
126  // The following list entry is used for performing closes that can't
127  // be done in the context of the original caller.
128  //
129 
132 
133  //
134  // The following two fields record if we are delaying a close.
135  //
136 
139 
140  //
141  // This is the ExWorkerItem that does both kinds of deferred closes.
142  //
143 
145 
146  //
147  // This spinlock protects several rapid-fire operations. NOTE: this is
148  // pretty horrible style.
149  //
150 
152 
153  //
154  // Cache manager call back structures, which must be passed on each call
155  // to CcInitializeCacheMap.
156  //
157 
160 
161 
163 
164 } FAT_DATA;
166 
167 //
168 // An array of these structures will keep
169 
170 typedef struct _FAT_WINDOW {
171 
172  ULONG FirstCluster; // The first cluster in this window.
173  ULONG LastCluster; // The last cluster in this window.
174  ULONG ClustersFree; // The number of clusters free in this window.
175 
176 } FAT_WINDOW;
178 
179 //
180 // Forward reference some circular referenced structures.
181 //
182 
183 typedef struct _VCB VCB;
184 typedef VCB *PVCB;
185 
186 typedef struct _FCB FCB;
187 typedef FCB *PFCB;
188 
189 //
190 // This structure is used to keep track of information needed to do a
191 // deferred close. It is now embedded in a CCB so we don't have to
192 // allocate one in the close path (with mustsucceed).
193 //
194 
195 typedef struct {
196 
197  //
198  // Two sets of links, one for the global list and one for closes
199  // on a particular volume.
200  //
201 
204 
209 
210 } CLOSE_CONTEXT;
211 
213 
214 
215 //
216 // The Vcb (Volume control Block) record corresponds to every volume mounted
217 // by the file system. They are ordered in a queue off of FatData.VcbQueue.
218 // This structure must be allocated from non-paged pool
219 //
220 
221 typedef enum _VCB_CONDITION {
222  VcbGood = 1,
225 } VCB_CONDITION;
226 
227 typedef struct _VCB {
228 
229  //
230  // This is a common head for the FAT volume file
231  //
232 
234 
235  //
236  // The links for the device queue off of FatData.VcbQueue
237  //
238 
240 
241  //
242  // A pointer the device object passed in by the I/O system on a mount
243  // This is the target device object that the file system talks to when it
244  // needs to do any I/O (e.g., the disk stripper device object).
245  //
246  //
247 
249 
250 #if (NTDDI_VERSION > NTDDI_WIN8)
251  //
252  // The volume GUID of the target device object.
253  //
254 
255  GUID VolumeGuid;
256 #endif
257 
258  //
259  // The volume GUID path of the target device object.
260  //
261 
263 
264 
265  //
266  // A pointer to the VPB for the volume passed in by the I/O system on
267  // a mount.
268  //
269 
270  PVPB Vpb;
271 
272  //
273  // The internal state of the device. This is a collection of fsd device
274  // state flags.
275  //
276 
277  ULONG VcbState;
279 
280  //
281  // A pointer to the root DCB for this volume
282  //
283 
284  struct _FCB *RootDcb;
285 
286  //
287  // If the FAT has so many entries that the free cluster bitmap would
288  // be too large, we split the FAT into buckets, and only one bucket's
289  // worth of bits are kept in the bitmap.
290  //
291 
295 
296  //
297  // A count of the number of file objects that have opened the volume
298  // for direct access, and their share access state.
299  //
300 
303 
304  //
305  // A count of the number of file objects that have any file/directory
306  // opened on this volume, not including direct access. And also the
307  // count of the number of file objects that have a file opened for
308  // only read access (i.e., they cannot be modifying the disk).
309  //
310 
313 
314  //
315  // A count of the number of internal opens on this VCB.
316  //
317 
319 
320  //
321  // A count of the number of residual opens on this volume.
322  // This is usually two or three. One is for the virutal volume
323  // file. One is for the root directory. And one is for the
324  // EA file, if there is one.
325  //
326 
328 
329  //
330  // The bios parameter block field contains
331  // an unpacked copy of the bpb for the volume, it is initialized
332  // during mount time and can be read by everyone else after that.
333  //
334 
336 
338 
339  //
340  // The following structure contains information useful to the
341  // allocation support routines. Many of them are computed from
342  // elements of the Bpb, but are too involved to recompute every time
343  // they are needed.
344  //
345 
346  struct {
347 
348  LBO RootDirectoryLbo; // Lbo of beginning of root directory
349  LBO FileAreaLbo; // Lbo of beginning of file area
350  ULONG RootDirectorySize; // size of root directory in bytes
351 
352  ULONG NumberOfClusters; // total number of clusters on the volume
353  ULONG NumberOfFreeClusters; // number of free clusters on the volume
354 
355 
356  UCHAR FatIndexBitSize; // indicates if 12, 16, or 32 bit fat table
357 
358  UCHAR LogOfBytesPerSector; // Log(Bios->BytesPerSector)
359  UCHAR LogOfBytesPerCluster; // Log(Bios->SectorsPerCluster)
360 
362 
363  //
364  // The following Mcb is used to keep track of dirty sectors in the Fat.
365  // Runs of holes denote clean sectors while runs of LBO == VBO denote
366  // dirty sectors. The VBOs are that of the volume file, starting at
367  // 0. The granuality of dirt is one sectors, and additions are only
368  // made in sector chunks to prevent problems with several simultaneous
369  // updaters.
370  //
371 
373 
374  //
375  // The following MCB contains a list of all the bad clusters on the volume.
376  // It is empty until the first time the bad sectors on the volume are queried
377  // by calling FSCTL_GET_RETRIEVAL_POINTERS with a volume handle.
378  //
379 
381 
382  //
383  // The FreeClusterBitMap keeps track of all the clusters in the fat.
384  // A 1 means occupied while a 0 means free. It allows quick location
385  // of contiguous runs of free clusters. It is initialized on mount
386  // or verify.
387  //
388 
390 
391  //
392  // The following fast mutex controls access to the free cluster bit map
393  // and the buckets.
394  //
395 
397 
398  //
399  // A resource variable to control access to the volume specific data
400  // structures
401  //
402 
404 
405  //
406  // A resource to make sure no one changes the volume bitmap while
407  // you're using it. Only for volumes with NumberOfWindows > 1.
408  //
409 
411 
412 
413  //
414  // The following field points to the file object used to do I/O to
415  // the virtual volume file. The virtual volume file maps sectors
416  // 0 through the end of fat and is of a fixed size (determined during
417  // mount)
418  //
419 
421 
422  //
423  // The following field contains a record of special pointers used by
424  // MM and Cache to manipluate section objects. Note that the values
425  // are set outside of the file system. However the file system on an
426  // open/create will set the file object's SectionObject field to point
427  // to this field
428  //
429 
431 
432  //
433  // The following fields is a hint cluster index used by the file system
434  // when allocating a new cluster.
435  //
436 
438 
439  //
440  // This field contains the "DeviceObject" that this volume is
441  // currently mounted on. Note Vcb->Vpb->RealDevice is constant.
442  //
443 
445 
446  //
447  // This is a pointer to the file object and the Fcb which represent the ea data.
448  //
449 
451  struct _FCB *EaFcb;
452 
453  //
454  // The following field is a pointer to the file object that has the
455  // volume locked. if the VcbState has the locked flag set.
456  //
457 
459 
460  //
461  // The following is the head of a list of notify Irps.
462  //
463 
465 
466  //
467  // The following is used to synchronize the dir notify list.
468  //
469 
471 
472  //
473  // The following fast mutex is used to synchronize directory stream
474  // file object creation.
475  //
476 
478 
479  //
480  // This field holds the thread address of the current (or most recent
481  // depending on VcbState) thread doing a verify operation on this volume.
482  //
483 
485 
486  //
487  // The following two structures are used for CleanVolume callbacks.
488  //
489 
492 
493  //
494  // This field records the last time FatMarkVolumeDirty was called, and
495  // avoids excessive calls to push the CleanVolume forward in time.
496  //
497 
499 
500  //
501  // The following fields holds a pointer to a struct which is used to
502  // hold performance counters.
503  //
504 
506 
507  //
508  // The property tunneling cache for this volume
509  //
510 
512 
513  //
514  // The media change count is returned by IOCTL_CHECK_VERIFY and
515  // is used to verify that no user-mode app has swallowed a media change
516  // notification. This is only meaningful for removable media.
517  //
518 
520 
521  //
522  // The device number of the underlying storage device.
523  //
524 
526 
527  //
528  // Preallocated VPB for swapout, so we are not forced to consider
529  // must succeed pool.
530  //
531 
532  PVPB SwapVpb;
533 
534  //
535  // Per volume threading of the close queues.
536  //
537 
540 
541  //
542  // Fast mutex used by the ADVANCED FCB HEADER in this structure
543  //
544 
546 
547 
548  //
549  // How many close contexts were preallocated on this Vcb
550  //
551 #if DBG
552  ULONG CloseContextCount;
553 #endif
554 
555 } VCB;
556 typedef VCB *PVCB;
557 
558 #define VCB_STATE_FLAG_LOCKED (0x00000001)
559 #define VCB_STATE_FLAG_REMOVABLE_MEDIA (0x00000002)
560 #define VCB_STATE_FLAG_VOLUME_DIRTY (0x00000004)
561 #define VCB_STATE_FLAG_MOUNTED_DIRTY (0x00000010)
562 #define VCB_STATE_FLAG_SHUTDOWN (0x00000040)
563 #define VCB_STATE_FLAG_CLOSE_IN_PROGRESS (0x00000080)
564 #define VCB_STATE_FLAG_DELETED_FCB (0x00000100)
565 #define VCB_STATE_FLAG_CREATE_IN_PROGRESS (0x00000200)
566 #define VCB_STATE_FLAG_BOOT_OR_PAGING_FILE (0x00000800)
567 #define VCB_STATE_FLAG_DEFERRED_FLUSH (0x00001000)
568 #define VCB_STATE_FLAG_ASYNC_CLOSE_ACTIVE (0x00002000)
569 #define VCB_STATE_FLAG_WRITE_PROTECTED (0x00004000)
570 #define VCB_STATE_FLAG_REMOVAL_PREVENTED (0x00008000)
571 #define VCB_STATE_FLAG_VOLUME_DISMOUNTED (0x00010000)
572 #define VCB_STATE_VPB_NOT_ON_DEVICE (0x00020000)
573 #define VCB_STATE_FLAG_VPB_MUST_BE_FREED (0x00040000)
574 #define VCB_STATE_FLAG_DISMOUNT_IN_PROGRESS (0x00080000)
575 #define VCB_STATE_FLAG_BAD_BLOCKS_POPULATED (0x00100000)
576 #define VCB_STATE_FLAG_HOTPLUGGABLE (0x00200000)
577 #define VCB_STATE_FLAG_MOUNT_IN_PROGRESS (0x00800000)
578 
579 
580 //
581 // N.B - VOLUME_DISMOUNTED is an indication that FSCTL_DISMOUNT volume was
582 // executed on a volume. It does not replace VcbCondition as an indication
583 // that the volume is invalid/unrecoverable.
584 //
585 
586 //
587 // Define the file system statistics struct. Vcb->Statistics points to an
588 // array of these (one per processor) and they must be 64 byte aligned to
589 // prevent cache line tearing.
590 //
591 
592 #define FILE_SYSTEM_STATISTICS_WITHOUT_PAD (sizeof( FILESYSTEM_STATISTICS ) + sizeof( FAT_STATISTICS ))
593 
594 typedef struct _FILE_SYSTEM_STATISTICS {
595 
596  //
597  // This contains the actual data.
598  //
599 
602 
603  //
604  // Pad this structure to a multiple of 64 bytes.
605  //
606 
608 
610 
612 
613 
614 //
615 // The Volume Device Object is an I/O system device object with a workqueue
616 // and an VCB record appended to the end. There are multiple of these
617 // records, one for every mounted volume, and are created during
618 // a volume mount operation. The work queue is for handling an overload of
619 // work requests to the volume.
620 //
621 
622 typedef struct _VOLUME_DEVICE_OBJECT {
623 
625 
626  //
627  // The following field tells how many requests for this volume have
628  // either been enqueued to ExWorker threads or are currently being
629  // serviced by ExWorker threads. If the number goes above
630  // a certain threshold, put the request on the overflow queue to be
631  // executed later.
632  //
633 
635 
636  //
637  // The following field indicates the number of IRP's waiting
638  // to be serviced in the overflow queue.
639  //
640 
642 
643  //
644  // The following field contains the queue header of the overflow queue.
645  // The Overflow queue is a list of IRP's linked via the IRP's ListEntry
646  // field.
647  //
648 
650 
651  //
652  // The following spinlock protects access to all the above fields.
653  //
654 
656 
657  //
658  // This is a common head for the FAT volume file
659  //
660 
662 
663  //
664  // This is the file system specific volume control block.
665  //
666 
667  VCB Vcb;
668 
670 
672 
673 
674 //
675 // This is the structure used to contains the short name for a file
676 //
677 
678 typedef struct _FILE_NAME_NODE {
679 
680  //
681  // This points back to the Fcb for this file.
682  //
683 
684  struct _FCB *Fcb;
685 
686  //
687  // This is the name of this node.
688  //
689 
690  union {
691 
693 
695 
696  } Name;
697 
698  //
699  // Marker so we can figure out what kind of name we opened up in
700  // Fcb searches
701  //
702 
704 
705  //
706  // And the links. Our parent Dcb has a pointer to the root entry.
707  //
708 
710 
713 
714 //
715 // This structure contains fields which must be in non-paged pool.
716 //
717 
718 typedef struct _NON_PAGED_FCB {
719 
720  //
721  // The following field contains a record of special pointers used by
722  // MM and Cache to manipluate section objects. Note that the values
723  // are set outside of the file system. However the file system on an
724  // open/create will set the file object's SectionObject field to point
725  // to this field
726  //
727 
729 
730  //
731  // This context is non-zero only if the file currently has asynchronous
732  // non-cached valid data length extending writes. It allows
733  // synchronization between pending writes and other operations.
734  //
735 
737 
738  //
739  // This event is set when OutstandingAsyncWrites transitions to zero.
740  //
741 
743 
744  //
745  // This is the mutex that is inserted into the FCB_ADVANCED_HEADER
746  // FastMutex field
747  //
748 
750 
751 
752 } NON_PAGED_FCB;
753 
755 
756 //
757 // The Fcb/Dcb record corresponds to every open file and directory, and to
758 // every directory on an opened path. They are ordered in two queues, one
759 // queue contains every Fcb/Dcb record off of FatData.FcbQueue, the other
760 // queue contains only device specific records off of Vcb.VcbSpecificFcbQueue
761 //
762 
763 typedef enum _FCB_CONDITION {
764  FcbGood = 1,
767 } FCB_CONDITION;
768 
769 typedef struct _FCB {
770 
771  //
772  // The following field is used for fast I/O
773  //
774  // The following comments refer to the use of the AllocationSize field
775  // of the FsRtl-defined header to the nonpaged Fcb.
776  //
777  // For a directory when we create a Dcb we will not immediately
778  // initialize the cache map, instead we will postpone it until our first
779  // call to FatReadDirectoryFile or FatPrepareWriteDirectoryFile.
780  // At that time we will search the Fat to find out the current allocation
781  // size (by calling FatLookupFileAllocationSize) and then initialize the
782  // cache map to this allocation size.
783  //
784  // For a file when we create an Fcb we will not immediately initialize
785  // the cache map, instead we will postpone it until we need it and
786  // then we determine the allocation size from either searching the
787  // fat to determine the real file allocation, or from the allocation
788  // that we've just allocated if we're creating a file.
789  //
790  // A value of -1 indicates that we do not know what the current allocation
791  // size really is, and need to examine the fat to find it. A value
792  // of than -1 is the real file/directory allocation size.
793  //
794  // Whenever we need to extend the allocation size we call
795  // FatAddFileAllocation which (if we're really extending the allocation)
796  // will modify the Fat, Mcb, and update this field. The caller
797  // of FatAddFileAllocation is then responsible for altering the Cache
798  // map size.
799  //
800  // We are now using the ADVANCED fcb header to support filter contexts
801  // at the stream level
802  //
803 
805 
806  //
807  // This structure contains fields which must be in non-paged pool.
808  //
809 
811 
812  //
813  // The head of the fat alloaction chain. FirstClusterOfFile == 0
814  // means that the file has no current allocation.
815  //
816 
818 
819 
820  //
821  // The links for the queue of all fcbs for a specific dcb off of
822  // Dcb.ParentDcbQueue. For the root directory this queue is empty
823  // For a non-existent fcb this queue is off of the non existent
824  // fcb queue entry in the vcb.
825  //
826 
828 
829  //
830  // A pointer to the Dcb that is the parent directory containing
831  // this fcb. If this record itself is the root dcb then this field
832  // is null.
833  //
834 
835  struct _FCB *ParentDcb;
836 
837  //
838  // A pointer to the Vcb containing this Fcb
839  //
840 
841  PVCB Vcb;
842 
843  //
844  // The internal state of the Fcb. This is a collection Fcb state flags.
845  // Also the shared access for each time this file/directory is opened.
846  //
847 
848  ULONG FcbState;
851 
852 #ifdef SYSCACHE_COMPILE
853 
854  //
855  // For syscache we keep a bitmask that tells us if we have dispatched IO for
856  // the page aligned chunks of the stream.
857  //
858 
859  PULONG WriteMask;
860  ULONG WriteMaskData;
861 
862 #endif
863 
864  //
865  // A count of the number of file objects that have been opened for
866  // this file/directory, but not yet been cleaned up yet. This count
867  // is only used for data file objects, not for the Acl or Ea stream
868  // file objects. This count gets decremented in FatCommonCleanup,
869  // while the OpenCount below gets decremented in FatCommonClose.
870  //
871 
873 
874  //
875  // A count of the number of file objects that have opened
876  // this file/directory. For files & directories the FsContext of the
877  // file object points to this record.
878  //
879 
881 
882  //
883  // A count of how many of "UncleanCount" handles were opened for
884  // non-cached I/O.
885  //
886 
888 
889  //
890  // A count of purge failure mode references. A non zero count means
891  // purge failure mode is enabled. The count is synchronized by the
892  // Fcb.
893  //
894 
896 
897  //
898  // The following field is used to locate the dirent for this fcb/dcb.
899  // All directory are opened as mapped files so the only additional
900  // information we need to locate this dirent (beside its parent directory)
901  // is the byte offset for the dirent. Note that for the root dcb
902  // this field is not used.
903  //
904 
906 
907  //
908  // The following field is filled in when there is an Lfn associated
909  // with this file. It is the STARTING offset of the Lfn.
910  //
911 
913 
914  //
915  // Thess entries is kept in ssync with the dirent. It allows a more
916  // accurate verify capability and speeds up FatFastQueryBasicInfo().
917  //
918 
922 
923  //
924  // Valid data to disk
925  //
926 
928 
929  //
930  // The following field contains the retrieval mapping structure
931  // for the file/directory. Note that for the Root Dcb this
932  // structure is set at mount time. Also note that in this
933  // implementation of Fat the Mcb really maps VBOs to LBOs and not
934  // VBNs to LBNs.
935  //
936 
938 
939  //
940  // The following union is cased off of the node type code for the fcb.
941  // There is a seperate case for the directory versus file fcbs.
942  //
943 
944  union {
945 
946  //
947  // A Directory Control Block (Dcb)
948  //
949 
950  struct {
951 
952  //
953  // A queue of all the fcbs/dcbs that are opened under this
954  // Dcb.
955  //
956 
958 
959  //
960  // The following field points to the file object used to do I/O to
961  // the directory file for this dcb. The directory file maps the
962  // sectors for the directory. This field is initialized by
963  // CreateRootDcb but is left null by CreateDcb. It isn't
964  // until we try to read/write the directory file that we
965  // create the stream file object for non root dcbs.
966  //
967 
970 
971 
972  //
973  // If the UnusedDirentVbo is != 0xffffffff, then the dirent at this
974  // offset is guarenteed to unused. A value of 0xffffffff means
975  // it has yet to be initialized. Note that a value beyond the
976  // end of allocation means that there an unused dirent, but we
977  // will have to allocate another cluster to use it.
978  //
979  // DeletedDirentHint contains lowest possible VBO of a deleted
980  // dirent (assuming as above that it is not 0xffffffff).
981  //
982 
985 
986  //
987  // The following two entries links together all the Fcbs
988  // opened under this Dcb sorted in a splay tree by name.
989  //
990  // I'd like to go into why we have (and must have) two separate
991  // splay trees within the current fastfat architecture. I will
992  // provide some insight into what would have to change if we
993  // wanted to have a single UNICODE tree.
994  //
995  // What makes FAT unique is that both Oem and Unicode names sit
996  // side by side on disk. Several unique UNICODE names coming
997  // into fastfat can match a single OEM on-disk name, and there
998  // is really no way to enumerate all the possible UNICODE
999  // source strings that can map to a given OEM name. This argues
1000  // for converting the incomming UNICODE name into OEM, and then
1001  // running through an OEM splay tree of the open files. This
1002  // works well when there are only OEM names on disk.
1003  //
1004  // The UNICODE name on disk can be VERY different from the short
1005  // name in the DIRENT and not even representable in the OEM code
1006  // page. Even if it were representable in OEM, it is possible
1007  // that a case varient of the original UNICODE name would match
1008  // a different OEM name, causing us to miss the Fcb in the
1009  // prefix lookup phase. In these cases, we must put UNICODE
1010  // name in the splay to guarentee that we find any case varient
1011  // of the input UNICODE name. See the routine description of
1012  // FatConstructNamesInFcb() for a detailed analysis of how we
1013  // detect this case.
1014  //
1015  // The fundamental limitation we are imposing here is that if
1016  // an Fcb exists for an open file, we MUST find it during the
1017  // prefix stage. This is a basic premise of the create path
1018  // in fastfat. In fact if we later find it gravelling through
1019  // the disk (but not the splay tree), we will bug check if we
1020  // try to add a duplicate entry to the splay tree (not to
1021  // mention having two Fcbs). If we had some mechanism to deal
1022  // with cases (and they would be rare) that we don't find the
1023  // entry in the splay tree, but the Fcb is actually in there,
1024  // then we could go to a single UNICODE splay tree. While
1025  // this uses more pool for the splay tree, and makes string
1026  // compares maybe take a bit as longer, it would eliminate the
1027  // need for any NLS conversion during the prefix phase, so it
1028  // might really be a net win.
1029  //
1030  // The current scheme was optimized for non-extended names
1031  // (i.e. US names). As soon as you start using extended
1032  // characters, then it is clearly a win as many code paths
1033  // become active that would otherwise not be needed if we
1034  // only had a single UNICODE splay tree.
1035  //
1036  // We may think about changing this someday.
1037  //
1038 
1041 
1042  //
1043  // The following field keeps track of free dirents, i.e.,
1044  // dirents that are either unallocated for deleted.
1045  //
1046 
1048 
1049  //
1050  // Since the FCB specific part of this union is larger, use
1051  // the slack here for an initial bitmap buffer. Currently
1052  // there is enough space here for an 8K cluster.
1053  //
1054 
1056 
1057  } Dcb;
1058 
1059  //
1060  // A File Control Block (Fcb)
1061  //
1062 
1063  struct {
1064 
1065  //
1066  // The following field is used by the filelock module
1067  // to maintain current byte range locking information.
1068  //
1069 
1071 
1072 #if (NTDDI_VERSION < NTDDI_WIN8)
1073  //
1074  // The following field is used by the oplock module
1075  // to maintain current oplock information.
1076  //
1077 
1078  OPLOCK Oplock;
1079 #endif
1080 
1081  //
1082  // This pointer is used to detect writes that eminated in the
1083  // cache manager's lazywriter. It prevents lazy writer threads,
1084  // who already have the Fcb shared, from trying to acquire it
1085  // exclusive, and thus causing a deadlock.
1086  //
1087 
1089 
1090 
1091  } Fcb;
1092 
1093  } Specific;
1094 
1095  //
1096  // The following field is used to verify that the Ea's for a file
1097  // have not changed between calls to query for Ea's. It is compared
1098  // with a similar field in a Ccb.
1099  //
1100  // IMPORTANT!! **** DO NOT MOVE THIS FIELD ****
1101  //
1102  // The slack space in the union above is computed from
1103  // the field offset of the EaModificationCount.
1104  //
1105 
1107 
1108  //
1109  // The following field is the fully qualified file name for this FCB/DCB
1110  // starting from the root of the volume, and last file name in the
1111  // fully qualified name.
1112  //
1113 
1115 
1116  //
1117  // The following field is only filled in if it is needed with the user's
1118  // opened path
1119  //
1120 
1122 
1124 
1125  //
1126  // To make life simpler we also keep in the Fcb/Dcb a current copy of
1127  // the fat attribute byte for the file/directory. This field must
1128  // also be updated when we create the Fcb, modify the File, or verify
1129  // the Fcb
1130  //
1131 
1133 
1134  //
1135  // The case preserved long filename
1136  //
1137 
1139 
1140  //
1141  // If the UNICODE Lfn is fully expressible in the system Oem code
1142  // page, then we will store it in a prefix table, otherwise we will
1143  // store the last UNICODE name in the Fcb. In both cases the name
1144  // has been upcased.
1145  //
1146  // Note that we may need neither of these fields if an LFN was strict
1147  // 8.3 or differed only in case. Indeed if there wasn't an LFN, we
1148  // don't need them at all.
1149  //
1150 
1151  union {
1152 
1153  //
1154  // This first field is present if FCB_STATE_HAS_OEM_LONG_NAME
1155  // is set in the FcbState.
1156  //
1157 
1159 
1160  //
1161  // This first field is present if FCB_STATE_HAS_UNICODE_LONG_NAME
1162  // is set in the FcbState.
1163  //
1164 
1166 
1167  } LongName;
1168 
1169  //
1170  // Defragmentation / ReallocateOnWrite synchronization object. This
1171  // is filled in by FatMoveFile() and affects the read and write paths.
1172  //
1173 
1175 
1176 } FCB, *PFCB;
1177 
1178 #ifndef BUILDING_FSKDEXT
1179 //
1180 // DCB clashes with a type defined outside the filesystems, in headers
1181 // pulled in by FSKD. We don't need this typedef for fskd anyway....
1182 //
1183 typedef FCB DCB;
1184 typedef DCB *PDCB;
1185 #endif
1186 
1187 
1188 //
1189 // Here are the Fcb state fields.
1190 //
1191 
1192 #define FCB_STATE_DELETE_ON_CLOSE (0x00000001)
1193 #define FCB_STATE_TRUNCATE_ON_CLOSE (0x00000002)
1194 #define FCB_STATE_PAGING_FILE (0x00000004)
1195 #define FCB_STATE_FORCE_MISS_IN_PROGRESS (0x00000008)
1196 #define FCB_STATE_FLUSH_FAT (0x00000010)
1197 #define FCB_STATE_TEMPORARY (0x00000020)
1198 #define FCB_STATE_SYSTEM_FILE (0x00000080)
1199 #define FCB_STATE_NAMES_IN_SPLAY_TREE (0x00000100)
1200 #define FCB_STATE_HAS_OEM_LONG_NAME (0x00000200)
1201 #define FCB_STATE_HAS_UNICODE_LONG_NAME (0x00000400)
1202 #define FCB_STATE_DELAY_CLOSE (0x00000800)
1203 
1204 //
1205 // Copies of the dirent's FAT_DIRENT_NT_BYTE_* flags for
1206 // preserving case of the short name of a file
1207 //
1208 
1209 #define FCB_STATE_8_LOWER_CASE (0x00001000)
1210 #define FCB_STATE_3_LOWER_CASE (0x00002000)
1211 
1212 //
1213 // indicates FSCTL_MOVE_FILE is denied on this FCB
1214 //
1215 
1216 #define FCB_STATE_DENY_DEFRAG (0x00004000)
1217 
1218 
1219 //
1220 // Flag to indicate we should zero any deallocations from this file.
1221 //
1222 
1223 #define FCB_STATE_ZERO_ON_DEALLOCATION (0x00080000)
1224 
1225 //
1226 // This is the slack allocation in the Dcb part of the UNION above
1227 //
1228 
1229 #define DCB_UNION_SLACK_SPACE ((ULONG) \
1230  (FIELD_OFFSET(DCB, EaModificationCount) - \
1231  FIELD_OFFSET(DCB, Specific.Dcb.FreeDirentBitmapBuffer)) \
1232 )
1233 
1234 //
1235 // This is the special (64bit) allocation size that indicates the
1236 // real size must be retrieved from disk. Define it here so we
1237 // avoid excessive magic numbering around the driver.
1238 //
1239 
1240 #define FCB_LOOKUP_ALLOCATIONSIZE_HINT ((LONGLONG) -1)
1241 
1242 
1243 //
1244 // The Ccb record is allocated for every file object. Note that this
1245 // record is exactly 0x34 long on x86 so that it will fit into a 0x40
1246 // piece of pool. Please carefully consider modifications.
1247 //
1248 // Define the Flags field.
1249 //
1250 
1251 #define CCB_FLAG_MATCH_ALL (0x0001)
1252 #define CCB_FLAG_SKIP_SHORT_NAME_COMPARE (0x0002)
1253 
1254 //
1255 // This tells us whether we allocated buffers to hold search templates.
1256 //
1257 
1258 #define CCB_FLAG_FREE_OEM_BEST_FIT (0x0004)
1259 #define CCB_FLAG_FREE_UNICODE (0x0008)
1260 
1261 //
1262 // These flags prevents cleanup from updating the modify time, etc.
1263 //
1264 
1265 #define CCB_FLAG_USER_SET_LAST_WRITE (0x0010)
1266 #define CCB_FLAG_USER_SET_LAST_ACCESS (0x0020)
1267 #define CCB_FLAG_USER_SET_CREATION (0x0040)
1268 
1269 //
1270 // This bit says the file object associated with this Ccb was opened for
1271 // read only access.
1272 //
1273 
1274 #define CCB_FLAG_READ_ONLY (0x0080)
1275 
1276 //
1277 // These flags, are used is DASD handles in read and write.
1278 //
1279 
1280 #define CCB_FLAG_DASD_FLUSH_DONE (0x0100)
1281 #define CCB_FLAG_DASD_PURGE_DONE (0x0200)
1282 
1283 //
1284 // This flag keeps track of a handle that was opened for
1285 // DELETE_ON_CLOSE.
1286 //
1287 
1288 #define CCB_FLAG_DELETE_ON_CLOSE (0x0400)
1289 
1290 //
1291 // This flag keeps track of which side of the name pair on the file
1292 // associated with the handle was opened
1293 //
1294 
1295 #define CCB_FLAG_OPENED_BY_SHORTNAME (0x0800)
1296 
1297 //
1298 // This flag indicates that the query template has not been upcased
1299 // (i.e., query should be case-insensitive)
1300 //
1301 
1302 #define CCB_FLAG_QUERY_TEMPLATE_MIXED (0x1000)
1303 
1304 //
1305 // This flag indicates that reads and writes via this DASD handle
1306 // are allowed to start or extend past the end of file.
1307 //
1308 
1309 #define CCB_FLAG_ALLOW_EXTENDED_DASD_IO (0x2000)
1310 
1311 //
1312 // This flag indicates we want to match volume labels in directory
1313 // searches (important for the root dir defrag).
1314 //
1315 
1316 #define CCB_FLAG_MATCH_VOLUME_ID (0x4000)
1317 
1318 //
1319 // This flag indicates the ccb has been converted over into a
1320 // close context for asynchronous/delayed closing of the handle.
1321 //
1322 
1323 #define CCB_FLAG_CLOSE_CONTEXT (0x8000)
1324 
1325 //
1326 // This flag indicates that when the handle is closed, we want
1327 // a physical dismount to occur.
1328 //
1329 
1330 #define CCB_FLAG_COMPLETE_DISMOUNT (0x10000)
1331 
1332 //
1333 // This flag indicates the handle may not call priveleged
1334 // FSCTL which modify the volume.
1335 //
1336 
1337 #define CCB_FLAG_MANAGE_VOLUME_ACCESS (0x20000)
1338 
1339 //
1340 // This flag indicates that a format unit commmand was issued
1341 // on this handle and all subsequent writes need to ignore verify.
1342 //
1343 
1344 #define CCB_FLAG_SENT_FORMAT_UNIT (0x40000)
1345 
1346 //
1347 // This flag indicates that this CCB was the one that marked the
1348 // handle as non-movable.
1349 //
1350 
1351 #define CCB_FLAG_DENY_DEFRAG (0x80000)
1352 
1353 //
1354 // This flag indicates that this CCB wrote to the file.
1355 //
1356 
1357 #define CCB_FLAG_FIRST_WRITE_SEEN (0x100000)
1358 
1359 typedef struct _CCB {
1360 
1361  //
1362  // Type and size of this record (must be FAT_NTC_CCB)
1363  //
1364 
1367 
1368  //
1369  // Define a 24bit wide field for Flags, but a UCHAR for Wild Cards Present
1370  // since it is used so often. Line these up on byte boundaries for grins.
1371  //
1372 
1373  ULONG Flags:24;
1375 
1376  //
1377  // Pointer to EDP context.
1378  //
1379 
1381 
1382  //
1383  // Overlay a close context on the data of the CCB. The remaining
1384  // fields are not useful during close, and we would like to avoid
1385  // paying extra pool for it.
1386  //
1387 
1388  union {
1389 
1390  struct {
1391 
1392  //
1393  // Save the offset to start search from.
1394  //
1395 
1397 
1398  //
1399  // The query template is used to filter directory query requests.
1400  // It originally is set to null and on the first call the NtQueryDirectory
1401  // it is set to the input filename or "*" if the name is not supplied.
1402  // All subsquent queries then use this template.
1403  //
1404  // The Oem structure are unions because if the name is wild we store
1405  // the arbitrary length string, while if the name is constant we store
1406  // 8.3 representation for fast comparison.
1407  //
1408 
1409  union {
1410 
1411  //
1412  // If the template contains a wild card use this.
1413  //
1414 
1416 
1417  //
1418  // If the name is constant, use this part.
1419  //
1420 
1422 
1423  } OemQueryTemplate;
1424 
1426 
1427  //
1428  // The field is compared with the similar field in the Fcb to determine
1429  // if the Ea's for a file have been modified.
1430  //
1431 
1433 
1434  //
1435  // The following field is used as an offset into the Eas for a
1436  // particular file. This will be the offset for the next
1437  // Ea to return. A value of 0xffffffff indicates that the
1438  // Ea's are exhausted.
1439  //
1440 
1442 
1443  };
1444 
1446  };
1447 
1448 } CCB;
1449 typedef CCB *PCCB;
1450 
1451 //
1452 // The Irp Context record is allocated for every orginating Irp. It is
1453 // created by the Fsd dispatch routines, and deallocated by the FatComplete
1454 // request routine. It contains a structure called of type REPINNED_BCBS
1455 // which is used to retain pinned bcbs needed to handle abnormal termination
1456 // unwinding.
1457 //
1458 
1459 #define REPINNED_BCBS_ARRAY_SIZE (4)
1460 
1461 typedef struct _REPINNED_BCBS {
1462 
1463  //
1464  // A pointer to the next structure contains additional repinned bcbs
1465  //
1466 
1468 
1469  //
1470  // A fixed size array of pinned bcbs. Whenever a new bcb is added to
1471  // the repinned bcb structure it is added to this array. If the
1472  // array is already full then another repinned bcb structure is allocated
1473  // and pointed to with Next.
1474  //
1475 
1477 
1478 } REPINNED_BCBS;
1480 
1481 typedef struct _IRP_CONTEXT {
1482 
1483  //
1484  // Type and size of this record (must be FAT_NTC_IRP_CONTEXT)
1485  //
1486 
1489 
1490  //
1491  // This structure is used for posting to the Ex worker threads.
1492  //
1493 
1495 
1496  //
1497  // A pointer to the originating Irp.
1498  //
1499 
1501 
1502  //
1503  // Originating Device (required for workque algorithms)
1504  //
1505 
1507 
1508  //
1509  // Originating Vcb (required for exception handling)
1510  // On mounts, this will be set before any exceptions
1511  // indicating corruption can be thrown.
1512  //
1513 
1514  PVCB Vcb;
1515 
1516  //
1517  // Major and minor function codes copied from the Irp
1518  //
1519 
1522 
1523  //
1524  // The following fields indicate if we can wait/block for a resource
1525  // or I/O, if we are to do everything write through, and if this
1526  // entry into the Fsd is a recursive call.
1527  //
1528 
1530 
1531  ULONG Flags;
1532 
1533  //
1534  // The following field contains the NTSTATUS value used when we are
1535  // unwinding due to an exception
1536  //
1537 
1539 
1540  //
1541  // The following context block is used for non-cached Io
1542  //
1543 
1545 
1546  //
1547  // For a abnormal termination unwinding this field contains the Bcbs
1548  // that are kept pinned until the Irp is completed.
1549  //
1550 
1552 
1553 
1554 } IRP_CONTEXT;
1556 
1557 #define IRP_CONTEXT_FLAG_DISABLE_DIRTY (0x00000001)
1558 #define IRP_CONTEXT_FLAG_WAIT (0x00000002)
1559 #define IRP_CONTEXT_FLAG_WRITE_THROUGH (0x00000004)
1560 #define IRP_CONTEXT_FLAG_DISABLE_WRITE_THROUGH (0x00000008)
1561 #define IRP_CONTEXT_FLAG_RECURSIVE_CALL (0x00000010)
1562 #define IRP_CONTEXT_FLAG_DISABLE_POPUPS (0x00000020)
1563 #define IRP_CONTEXT_FLAG_DEFERRED_WRITE (0x00000040)
1564 #define IRP_CONTEXT_FLAG_VERIFY_READ (0x00000080)
1565 #define IRP_CONTEXT_STACK_IO_CONTEXT (0x00000100)
1566 #define IRP_CONTEXT_FLAG_IN_FSP (0x00000200)
1567 #define IRP_CONTEXT_FLAG_USER_IO (0x00000400) // for performance counters
1568 #define IRP_CONTEXT_FLAG_DISABLE_RAISE (0x00000800)
1569 #define IRP_CONTEXT_FLAG_OVERRIDE_VERIFY (0x00001000)
1570 #define IRP_CONTEXT_FLAG_CLEANUP_BREAKING_OPLOCK (0x00002000)
1571 
1572 
1573 #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1574 #define IRP_CONTEXT_FLAG_SWAPPED_STACK (0x00100000)
1575 #endif
1576 
1577 #define IRP_CONTEXT_FLAG_PARENT_BY_CHILD (0x80000000)
1578 
1579 
1580 //
1581 // Context structure for non-cached I/O calls. Most of these fields
1582 // are actually only required for the Read/Write Multiple routines, but
1583 // the caller must allocate one as a local variable anyway before knowing
1584 // whether there are multiple requests are not. Therefore, a single
1585 // structure is used for simplicity.
1586 //
1587 
1588 typedef struct _FAT_IO_CONTEXT {
1589 
1590  //
1591  // A copy of the IrpContext flags preserved for use in
1592  // async I/O completion.
1593  //
1594 
1596 
1597  //
1598  // These two field are used for multiple run Io
1599  //
1600 
1601  __volatile LONG IrpCount;
1603 
1604  //
1605  // MDL to describe partial sector zeroing
1606  //
1607 
1609 
1610  union {
1611 
1612  //
1613  // This element handles the asychronous non-cached Io
1614  //
1615 
1616  struct {
1623  } Async;
1624 
1625  //
1626  // and this element the sycnrhonous non-cached Io
1627  //
1628 
1630 
1631  } Wait;
1632 
1633 
1634 } FAT_IO_CONTEXT;
1635 
1637 
1638 //
1639 // An array of these structures is passed to FatMultipleAsync describing
1640 // a set of runs to execute in parallel.
1641 //
1642 
1643 typedef struct _IO_RUNS {
1644 
1650 
1651 } IO_RUN;
1652 
1653 typedef IO_RUN *PIO_RUN;
1654 
1655 //
1656 // This structure is used by FatDeleteDirent to preserve the first cluster
1657 // and file size info for undelete utilities.
1658 //
1659 
1660 typedef struct _DELETE_CONTEXT {
1661 
1664 
1665 } DELETE_CONTEXT;
1666 
1668 
1669 //
1670 // This record is used with to set a flush to go off one second after the
1671 // first write on slow devices with a physical indication of activity, like
1672 // a floppy. This is an attempt to keep the red light on.
1673 //
1674 
1675 typedef struct _DEFERRED_FLUSH_CONTEXT {
1676 
1680 
1682 
1684 
1686 
1687 //
1688 // This structure is used for the FatMarkVolumeClean callbacks.
1689 //
1690 
1692 
1698 
1699 //
1700 // This structure is used when a page fault is running out of stack.
1701 //
1702 
1707 
1708 //
1709 // This structure is used to access the EaFile.
1710 //
1711 
1712 #define EA_BCB_ARRAY_SIZE 8
1713 
1714 typedef struct _EA_RANGE {
1715 
1723 
1724 } EA_RANGE, *PEA_RANGE;
1725 
1726 #define EA_RANGE_HEADER_SIZE (FIELD_OFFSET( EA_RANGE, BcbArray ))
1727 
1728 //
1729 // These symbols are used by the upcase/downcase routines.
1730 //
1731 
1732 #define WIDE_LATIN_CAPITAL_A (0xff21)
1733 #define WIDE_LATIN_CAPITAL_Z (0xff3a)
1734 #define WIDE_LATIN_SMALL_A (0xff41)
1735 #define WIDE_LATIN_SMALL_Z (0xff5a)
1736 
1737 //
1738 // These values are returned by FatInterpretClusterType.
1739 //
1740 
1741 typedef enum _CLUSTER_TYPE {
1747 } CLUSTER_TYPE;
1748 
1749 #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
1750 // ============================================================================
1751 // ============================================================================
1752 //
1753 // Stack Swapping Support
1754 //
1755 // ============================================================================
1756 // ============================================================================
1757 
1758 //
1759 // This structure is used when doing a callout on a new stack.
1760 // It contains the parameters for various functions and a place
1761 // to store the return code.
1762 //
1763 
1764 typedef struct _FAT_CALLOUT_PARAMETERS {
1765 
1766  union {
1767 
1768  //
1769  // Parameters for a create request via FatCommonCreate().
1770  //
1771 
1772  struct {
1773 
1776 
1777  } Create;
1778 
1779  };
1780 
1783 
1785 #endif
1786 
1787 #endif // _FATSTRUC_
1788 
1789 
struct _FCB::@708::@710 Dcb
struct _FAT_CALLOUT_PARAMETERS * PFAT_CALLOUT_PARAMETERS
signed char * PCHAR
Definition: retypes.h:7
struct _FCB * EaFcb
Definition: fatstruc.h:451
struct _FCB * Fcb
Definition: fatstruc.h:684
FAT_IO_CONTEXT * PFAT_IO_CONTEXT
Definition: fatstruc.h:1636
struct _FAT_CALLOUT_PARAMETERS FAT_CALLOUT_PARAMETERS
LARGE_INTEGER CreationTime
Definition: fatstruc.h:919
struct _IRP_CONTEXT IRP_CONTEXT
ULONG NumberOfWindows
Definition: fatstruc.h:292
FILE_LOCK FileLock
Definition: fatstruc.h:1070
LARGE_INTEGER LastWriteTime
Definition: fatstruc.h:921
union _FCB::@709 LongName
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
NODE_TYPE_CODE NodeTypeCode
Definition: fatstruc.h:37
FSRTL_COMMON_FCB_HEADER VolumeFileHeader
Definition: fatstruc.h:661
struct _DEFERRED_FLUSH_CONTEXT DEFERRED_FLUSH_CONTEXT
PIO_WORKITEM FatCloseItem
Definition: fatstruc.h:144
UCHAR Pad[((FILE_SYSTEM_STATISTICS_WITHOUT_PAD+0x3f) &~0x3f) - FILE_SYSTEM_STATISTICS_WITHOUT_PAD]
Definition: fatstruc.h:607
PVOID CdromFileSystemDeviceObject
Definition: fatstruc.h:61
struct _IO_RUNS IO_RUN
BOOLEAN AuxilaryBuffer
Definition: fatstruc.h:1720
ULONG ClustersFree
Definition: fatstruc.h:174
PVOID ZeroPage
Definition: fatstruc.h:162
LIST_ENTRY AsyncCloseList
Definition: fatstruc.h:538
PBCB * BcbChain
Definition: fatstruc.h:1721
PERESOURCE Resource
Definition: fatstruc.h:1617
BOOLEAN FujitsuFMR
Definition: fatstruc.h:94
struct _FILE_SYSTEM_STATISTICS * Statistics
Definition: fatstruc.h:505
PRTL_SPLAY_LINKS RootOemNode
Definition: fatstruc.h:1039
VBO OffsetToStartSearchFrom
Definition: fatstruc.h:1396
struct _CLEAN_AND_DIRTY_VOLUME_PACKET CLEAN_AND_DIRTY_VOLUME_PACKET
FILE_NAME_NODE Oem
Definition: fatstruc.h:1158
PKTHREAD VerifyThread
Definition: fatstruc.h:484
FILE_NAME_NODE * PFILE_NAME_NODE
Definition: fatstruc.h:712
FSRTL_ADVANCED_FCB_HEADER Header
Definition: cdstruc.h:931
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: fatstruc.h:158
PVOID LazyWriteThread
Definition: fatstruc.h:1088
struct _FAT_IO_CONTEXT * FatIoContext
Definition: fatstruc.h:1544
PUCHAR First0x24BytesOfBootSector
Definition: fatstruc.h:337
struct _DELETE_CONTEXT DELETE_CONTEXT
ERESOURCE Resource
Definition: fatstruc.h:403
PIRP OriginatingIrp
Definition: fatstruc.h:1500
Definition: cdstruc.h:908
Definition: cdstruc.h:1073
ULONG32 VBO
Definition: fat.h:38
unsigned char * PUCHAR
Definition: retypes.h:3
VOLUME_DEVICE_OBJECT * PVOLUME_DEVICE_OBJECT
Definition: fatstruc.h:671
RTL_BITMAP FreeClusterBitMap
Definition: fatstruc.h:389
_FCB_CONDITION
Definition: cdstruc.h:784
BOOLEAN ContainsWildCards
Definition: fatstruc.h:1374
LONG NTSTATUS
Definition: precomp.h:26
KSPIN_LOCK GeneralSpinLock
Definition: fatstruc.h:151
FCB DCB
Definition: fatstruc.h:1183
CSHORT NODE_BYTE_SIZE
Definition: nodetype.h:37
struct _CCB CCB
PFILE_OBJECT FileObject
Definition: fatstruc.h:1621
PFILE_OBJECT VirtualVolumeFile
Definition: fatstruc.h:420
UNICODE_STRING UnicodeQueryTemplate
Definition: fatstruc.h:1425
_VCB_CONDITION
Definition: cdstruc.h:494
Definition: cdstruc.h:504
ULONG FirstCluster
Definition: fatstruc.h:172
UCHAR MajorFunction
Definition: cdstruc.h:1200
PVPB Vpb
Definition: cdstruc.h:517
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: fatstruc.h:728
BOOLEAN ChicagoMode
Definition: fatstruc.h:86
UCHAR FAT8DOT3[11]
Definition: fat.h:295
BOOLEAN ShutdownStarted
Definition: fatstruc.h:107
#define REPINNED_BCBS_ARRAY_SIZE
Definition: fatstruc.h:1459
STRING OEM_STRING
Definition: umtypes.h:203
LIST_ENTRY ParentDcbLinks
Definition: fatstruc.h:827
ULONG VcbState
Definition: cdstruc.h:546
CLONG PurgeFailureModeEnableCount
Definition: fatstruc.h:895
REPINNED_BCBS Repinned
Definition: fatstruc.h:1551
SECTION_OBJECT_POINTERS SectionObjectPointers
Definition: fatstruc.h:430
struct _FAT_CALLOUT_PARAMETERS::@719::@721 Create
BOOLEAN HighAsync
Definition: fatstruc.h:121
struct _FCB * ParentDcb
Definition: fatstruc.h:835
ULONG EaModificationCount
Definition: fatstruc.h:1106
ULONG FirstClusterOfFile
Definition: fatstruc.h:1663
__volatile ULONG DirectoryFileOpenCount
Definition: fatstruc.h:968
PVPB SwapVpb
Definition: cdstruc.h:673
ERESOURCE ChangeBitMapResource
Definition: fatstruc.h:410
PFILE_OBJECT VirtualEaFile
Definition: fatstruc.h:450
FSRTL_ADVANCED_FCB_HEADER VolumeFileHeader
Definition: fatstruc.h:233
LARGE_MCB Mcb
Definition: fatstruc.h:937
PFAT_WINDOW CurrentWindow
Definition: fatstruc.h:294
struct _PAGING_FILE_OVERFLOW_PACKET * PPAGING_FILE_OVERFLOW_PACKET
PFILE_OBJECT FileObjectWithVcbLocked
Definition: fatstruc.h:458
RTL_SPLAY_LINKS Links
Definition: fatstruc.h:709
NODE_TYPE_CODE NodeTypeCode
Definition: fatstruc.h:1365
ULONG OverflowQueueCount
Definition: cdstruc.h:752
FAT_STATISTICS Fat
Definition: fatstruc.h:601
USHORT BcbChainLength
Definition: fatstruc.h:1719
IO_RUN * PIO_RUN
Definition: fatstruc.h:1653
SHARE_ACCESS ShareAccess
Definition: fatstruc.h:302
LIST_ENTRY DelayedCloseList
Definition: fatstruc.h:138
BOOLEAN FileNameDos
Definition: fatstruc.h:703
ULONG CLONG
Definition: umtypes.h:126
VCB * PVCB
Definition: fatstruc.h:184
LBO RootDirectoryLbo
Definition: fatstruc.h:348
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN TypeOfOpen
Definition: cdprocs.h:593
PVOID LazyWriteThread
Definition: fatstruc.h:41
CCB * PCCB
Definition: fatstruc.h:1449
BOOLEAN CodePageInvariant
Definition: fatstruc.h:114
LARGE_INTEGER LastAccessTime
Definition: fatstruc.h:920
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
VBO Vbo
Definition: fatstruc.h:1646
ULONG NumberProcessors
Definition: fatstruc.h:80
long LONG
Definition: pedump.c:60
LONGLONG LBO
Definition: fat.h:34
REPINNED_BCBS * PREPINNED_BCBS
Definition: fatstruc.h:1479
FAST_MUTEX DirectoryFileCreationMutex
Definition: fatstruc.h:477
union _FAT_IO_CONTEXT::@717 Wait
UCHAR DirentFatFlags
Definition: fatstruc.h:1132
PBCB BcbArray[EA_BCB_ARRAY_SIZE]
Definition: fatstruc.h:1722
NTSTATUS ExceptionStatus
Definition: cdstruc.h:1164
PNON_PAGED_FCB NonPaged
Definition: fatstruc.h:810
struct _VCB VCB
Definition: fatstruc.h:183
unsigned char BOOLEAN
FAST_MUTEX AdvancedFcbHeaderMutex
Definition: fatstruc.h:545
LARGE_MCB DirtyFatMcb
Definition: fatstruc.h:372
ULONG EaModificationCount
Definition: fatstruc.h:1432
FILE_NAME_NODE Unicode
Definition: fatstruc.h:1165
PIRP_CONTEXT IrpContext
Definition: fatstruc.h:1774
UCHAR LogOfBytesPerSector
Definition: fatstruc.h:358
enum _FCB_CONDITION FCB_CONDITION
ULONG Flags
Definition: cdstruc.h:1086
enum _VCB_CONDITION VCB_CONDITION
struct _NON_PAGED_FCB NON_PAGED_FCB
struct _FAT_IO_CONTEXT FAT_IO_CONTEXT
PFILE_OBJECT DirectoryFile
Definition: fatstruc.h:969
WORK_QUEUE_ITEM Item
Definition: fatstruc.h:1679
ULONG ClusterHint
Definition: fatstruc.h:437
FILESYSTEM_STATISTICS Common
Definition: fatstruc.h:600
PKEVENT MoveFileEvent
Definition: fatstruc.h:1174
ULONG Offset
Definition: fatstruc.h:1647
struct _REPINNED_BCBS REPINNED_BCBS
DEVICE_OBJECT DeviceObject
Definition: cdstruc.h:735
PDRIVER_OBJECT DriverObject
Definition: fatstruc.h:54
ULONG OffsetOfNextEaToReturn
Definition: fatstruc.h:1441
ULONG IrpContextFlags
Definition: fatstruc.h:1595
CLONG ReadOnlyCount
Definition: fatstruc.h:312
struct _VCB::@706 AllocationSupport
OEM_STRING Oem
Definition: fatstruc.h:692
struct _EA_RANGE * PEA_RANGE
struct _CLEAN_AND_DIRTY_VOLUME_PACKET * PCLEAN_AND_DIRTY_VOLUME_PACKET
_TYPE_OF_OPEN
Definition: cdprocs.h:576
UNICODE_STRING VolumeGuidPath
Definition: fatstruc.h:262
FAST_MUTEX
Definition: extypes.h:17
LIST_ENTRY GlobalLinks
Definition: fatstruc.h:202
SHARE_ACCESS ShareAccess
Definition: cdstruc.h:1015
BOOLEAN AsyncCloseActive
Definition: fatstruc.h:100
PERESOURCE Resource2
Definition: fatstruc.h:1618
ERESOURCE_THREAD ResourceThreadId
Definition: fatstruc.h:1619
CLONG NonCachedUncleanCount
Definition: fatstruc.h:887
UCHAR MinorFunction
Definition: cdstruc.h:1201
PDEVICE_OBJECT TargetDeviceObject
Definition: cdstruc.h:523
ULONG Flags
Definition: cdstruc.h:1171
enum _CLUSTER_TYPE CLUSTER_TYPE
WORK_QUEUE_ITEM WorkQueueItem
Definition: cdstruc.h:1214
FAT_DATA * PFAT_DATA
Definition: fatstruc.h:165
BOOLEAN Free
Definition: fatstruc.h:208
struct _FCB * RootDcb
Definition: fatstruc.h:284
LIST_ENTRY VcbLinks
Definition: fatstruc.h:203
CLONG OpenFileCount
Definition: fatstruc.h:311
VBO LfnOffsetWithinDirectory
Definition: fatstruc.h:912
PNON_PAGED_FCB NonPagedFcb
Definition: fatstruc.h:1622
union _CCB::@712::@714::@716 OemQueryTemplate
NON_PAGED_FCB * PNON_PAGED_FCB
Definition: fatstruc.h:754
union _FCB::@708 Specific
LIST_ENTRY ParentDcbQueue
Definition: fatstruc.h:957
PEPROCESS OurProcess
Definition: fatstruc.h:74
LIST_ENTRY VcbLinks
Definition: cdstruc.h:538
struct _FAT_DATA FAT_DATA
_CLUSTER_TYPE
Definition: fatstruc.h:1741
FAT8DOT3 Constant
Definition: fatstruc.h:1421
* PFILE_OBJECT
Definition: iotypes.h:1955
ULONG ByteCount
Definition: fatstruc.h:1648
ULONG LastCluster
Definition: fatstruc.h:173
struct _FCB FCB
Definition: fatstruc.h:186
UNICODE_STRING FullFileName
Definition: fatstruc.h:1121
NODE_TYPE_CODE NodeTypeCode
Definition: fatstruc.h:1487
IRP_CONTEXT * PIRP_CONTEXT
Definition: fatstruc.h:1555
NODE_BYTE_SIZE NodeByteSize
Definition: fatstruc.h:38
VBO DeletedDirentHint
Definition: fatstruc.h:984
FAST_MUTEX AdvancedFcbHeaderMutex
Definition: fatstruc.h:749
unsigned char UCHAR
Definition: xmlstorage.h:181
BOOLEAN HighDelayed
Definition: fatstruc.h:122
UCHAR PinCount
Definition: fatstruc.h:1529
LARGE_MCB BadBlockMcb
Definition: fatstruc.h:380
CLONG DirectAccessOpenCount
Definition: fatstruc.h:301
Definition: ketypes.h:687
struct _FCB::@708::@711 Fcb
FAT_WINDOW * PFAT_WINDOW
Definition: fatstruc.h:177
CLONG UncleanCount
Definition: fatstruc.h:872
union _FILE_NAME_NODE::@707 Name
ULONG NumberOfClusters
Definition: fatstruc.h:352
struct _PAGING_FILE_OVERFLOW_PACKET PAGING_FILE_OVERFLOW_PACKET
PCHAR Data
Definition: fatstruc.h:1716
FCB * PFCB
Definition: fatstruc.h:187
LARGE_INTEGER LastFatMarkVolumeDirtyCall
Definition: fatstruc.h:498
PVOID EncryptionOnCloseContext
Definition: fatstruc.h:1380
Definition: typedefs.h:117
CLOSE_CONTEXT * PCLOSE_CONTEXT
Definition: fatstruc.h:212
__volatile ULONG InternalOpenCount
Definition: fatstruc.h:318
ULONG FreeDirentBitmapBuffer[1]
Definition: fatstruc.h:1055
DELETE_CONTEXT * PDELETE_CONTEXT
Definition: fatstruc.h:1667
LIST_ENTRY VcbQueue
Definition: fatstruc.h:48
CLOSE_CONTEXT CloseContext
Definition: fatstruc.h:1445
VBO UnusedDirentVbo
Definition: fatstruc.h:983
UNICODE_STRING Unicode
Definition: fatstruc.h:694
PDEVICE_OBJECT RealDevice
Definition: cdstruc.h:1177
NODE_BYTE_SIZE NodeByteSize
Definition: cdstruc.h:1080
ULONG RequestedByteCount
Definition: fatstruc.h:1620
LBO Lbo
Definition: fatstruc.h:1645
DCB * PDCB
Definition: fatstruc.h:1184
ULONG DelayedCloseCount
Definition: fatstruc.h:137
VBO DirentOffsetWithinDirectory
Definition: fatstruc.h:905
ULONG StartingVbo
Definition: fatstruc.h:1717
ULONG DeviceNumber
Definition: fatstruc.h:525
FAST_MUTEX FreeClusterBitMapMutex
Definition: fatstruc.h:396
ULONG ChangeCount
Definition: fatstruc.h:519
ULONG ValidDataToDisk
Definition: fatstruc.h:927
unsigned short USHORT
Definition: pedump.c:61
VCB_CONDITION VcbCondition
Definition: cdstruc.h:547
PKEVENT OutstandingAsyncEvent
Definition: fatstruc.h:742
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
PDEVICE_OBJECT CurrentDevice
Definition: fatstruc.h:444
ERESOURCE Resource
Definition: fatstruc.h:67
unsigned int * PULONG
Definition: retypes.h:1
struct _VOLUME_DEVICE_OBJECT VOLUME_DEVICE_OBJECT
#define FILE_SYSTEM_STATISTICS_WITHOUT_PAD
Definition: fatstruc.h:592
LBO FileAreaLbo
Definition: fatstruc.h:349
CLONG OpenCount
Definition: fatstruc.h:880
ULONG NumberOfFreeClusters
Definition: fatstruc.h:353
struct _REPINNED_BCBS * Next
Definition: fatstruc.h:1467
PBCB Bcb[REPINNED_BCBS_ARRAY_SIZE]
Definition: fatstruc.h:1476
ULONG FirstClusterOfFile
Definition: fatstruc.h:817
TUNNEL Tunnel
Definition: fatstruc.h:511
struct _FAT_IO_CONTEXT::@717::@718 Async
UCHAR FatIndexBitSize
Definition: fatstruc.h:356
struct _FILE_NAME_NODE FILE_NAME_NODE
BIOS_PARAMETER_BLOCK Bpb
Definition: fatstruc.h:335
PFAT_WINDOW Windows
Definition: fatstruc.h:293
LIST_ENTRY DirNotifyList
Definition: cdstruc.h:619
Definition: iotypes.h:166
NODE_BYTE_SIZE NodeByteSize
Definition: cdstruc.h:1142
LIST_ENTRY DelayedCloseList
Definition: fatstruc.h:539
OEM_STRING Wild
Definition: fatstruc.h:1415
struct _EA_RANGE EA_RANGE
FILE_SYSTEM_STATISTICS * PFILE_SYSTEM_STATISTICS
Definition: fatstruc.h:611
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
PVCB Vcb
Definition: cdstruc.h:939
PNOTIFY_SYNC NotifySync
Definition: cdstruc.h:613
KSPIN_LOCK OverflowQueueSpinLock
Definition: cdstruc.h:766
#define EA_BCB_ARRAY_SIZE
Definition: fatstruc.h:1712
KTIMER CleanVolumeTimer
Definition: fatstruc.h:491
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
struct _FILE_SYSTEM_STATISTICS FILE_SYSTEM_STATISTICS
__volatile LONG IrpCount
Definition: fatstruc.h:1601
enum _VCB_CONDITION VCB_CONDITION
LIST_ENTRY AsyncCloseList
Definition: fatstruc.h:131
__volatile ULONG ResidualOpenCount
Definition: fatstruc.h:327
USHORT FinalNameLength
Definition: fatstruc.h:1123
KEVENT SyncEvent
Definition: fatstruc.h:1629
LIST_ENTRY OverflowQueue
Definition: cdstruc.h:760
struct _FAT_WINDOW FAT_WINDOW
FILE_NAME_NODE ShortName
Definition: fatstruc.h:1114
enum _FCB_CONDITION FCB_CONDITION
ULONG Length
Definition: fatstruc.h:1718
KDPC CleanVolumeDpc
Definition: fatstruc.h:490
ULONG FcbState
Definition: cdstruc.h:977
PIRP SavedIrp
Definition: fatstruc.h:1649
PRTL_SPLAY_LINKS RootUnicodeNode
Definition: fatstruc.h:1040
PVOID PBCB
Definition: fatstruc.h:20
UNICODE_STRING ExactCaseLongName
Definition: fatstruc.h:1138
PVOID DiskFileSystemDeviceObject
Definition: fatstruc.h:60
ULONG AsyncCloseCount
Definition: fatstruc.h:130
UCHAR LogOfBytesPerCluster
Definition: fatstruc.h:359
RTL_BITMAP FreeDirentBitmap
Definition: fatstruc.h:1047
DEFERRED_FLUSH_CONTEXT * PDEFERRED_FLUSH_CONTEXT
Definition: fatstruc.h:1685
ULONG RootDirectorySize
Definition: fatstruc.h:350
ULONG OutstandingAsyncWrites
Definition: fatstruc.h:736
FCB_CONDITION FcbCondition
Definition: fatstruc.h:849
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: fatstruc.h:159