1 /*************************************************************************
5 * Module: Ext2 File System Driver (Kernel mode execution only)
8 * This file contains structure definitions for the sample file system
9 * driver. Note that all structures are prefixed with the letters
10 * "Ext2". The structures are all aligned using normal alignment
11 * used by the compiler (typically quad-word aligned).
13 * Author: Manoj Paul Joseph
16 *************************************************************************/
18 #ifndef _EXT2_STRUCTURES_H_
19 #define _EXT2_STRUCTURES_H_
21 /**************************************************************************
22 some useful definitions
23 **************************************************************************/
29 typedef USHORT uint16
;
35 // This is a huge hack that will create a broken driver for GCC.
36 // The driver should use PSEH2.
40 #define except __except
41 #define finally __finally
44 #define except(x) if (0 && (x))
45 #define finally if (1)
46 #define GetExceptionInformation() 0
47 #define GetExceptionCode() 0
50 // we will use the LARGE_INTEGER structure as defined by NT
52 /**************************************************************************
53 some empty typedefs defined here so we can reference them easily
54 **************************************************************************/
55 struct _Ext2Identifier
;
56 struct _Ext2ObjectName
;
57 struct _Ext2ContextControlBlock
;
58 struct _Ext2NTRequiredFCB
;
59 struct _Ext2DiskDependentFCB
;
60 struct _Ext2FileControlBlock
;
61 struct _Ext2FileByteLocks
;
62 struct _Ext2VolumeControlBlock
;
63 struct _Ext2IrpContext
;
66 /**************************************************************************
67 each structure has a unique "node type" or signature associated with it
68 **************************************************************************/
69 #define EXT2_NODE_TYPE_OBJECT_NAME (0xfdecba01)
70 #define EXT2_NODE_TYPE_CCB (0xfdecba02)
71 #define EXT2_NODE_TYPE_FCB (0xfdecba03)
72 #define EXT2_NODE_TYPE_LOCKS (0xfdecba04)
73 #define EXT2_NODE_TYPE_VCB (0xfdecba05)
74 #define EXT2_NODE_TYPE_IRP_CONTEXT (0xfdecba06)
75 #define EXT2_NODE_TYPE_GLOBAL_DATA (0xfdecba07)
76 #define EXT2_NODE_TYPE_IO_CONTEXT (0xfdecba08)
77 #define EXT2_NODE_TYPE_SAVED_BCB (0xfdecba09)
78 #define EXT2_NODE_TYPE_FREED (0x10101010)
79 #define EXT2_NODE_TYPE_INVALID (0x10101010)
81 /**************************************************************************
82 every structure has a node type, and a node size associated with it.
83 The node type serves as a signature field. The size is used for
84 consistency checking ...
85 **************************************************************************/
86 typedef struct _Ext2Identifier
{
87 uint32 NodeType
; // a 32 bit identifier for the structure
88 uint32 NodeSize
; // computed as sizeof(structure)
89 } Ext2Identifier
, *PtrExt2Identifier
;
91 /**************************************************************************
92 Structures for byte-range lock support.
93 **************************************************************************/
94 typedef struct Ext2FileLockAnchor
{
95 LIST_ENTRY GrantedFileLockList
;
96 LIST_ENTRY PendingFileLockList
;
97 } Ext2FileLockAnchor
, *PtrExt2FileLockAnchor
;
99 typedef struct Ext2FileLockInfo
{
100 Ext2Identifier NodeIdentifier
;
101 uint32 FileLockFlags
;
103 LARGE_INTEGER StartingOffset
;
104 LARGE_INTEGER Length
;
105 LARGE_INTEGER EndingOffset
;
107 BOOLEAN ExclusiveLock
;
109 LIST_ENTRY NextFileLockEntry
;
110 } Ext2FileLockInfo
, *PtrExt2FileLockInfo
;
112 #define EXT2_BYTE_LOCK_NOT_FROM_ZONE (0x80000000)
113 #define EXT2_BYTE_LOCK_IS_PENDING (0x00000001)
115 /**************************************************************************
116 Every open on-disk object must have a name associated with it
117 This name has two components:
118 (a) the path-name (prefix) that leads to this on-disk object
119 (b) the name of the object itself
120 Note that with multiply linked objects, a single object might be
121 associated with more than one name structure.
122 This sample FSD does not correctly support multiply linked objects.
124 This structure must be quad-word aligned because it is zone allocated.
125 **************************************************************************/
126 typedef struct _Ext2ObjectName
{
127 Ext2Identifier NodeIdentifier
;
128 uint32 ObjectNameFlags
;
129 // an absolute pathname of the object is stored below
130 UNICODE_STRING ObjectName
;
131 } Ext2ObjectName
, *PtrExt2ObjectName
;
133 #define EXT2_OB_NAME_NOT_FROM_ZONE (0x80000000)
135 /**************************************************************************
136 Each file open instance is represented by a context control block.
137 For each successful create/open request; a file object and a CCB will
139 For open operations performed internally by the FSD, there may not
140 exist file objects; but a CCB will definitely be created.
142 This structure must be quad-word aligned because it is zone allocated.
143 **************************************************************************/
144 typedef struct _Ext2ContextControlBlock
{
145 Ext2Identifier NodeIdentifier
;
146 // ptr to the associated FCB
147 struct _Ext2FileControlBlock
*PtrFCB
;
148 // all CCB structures for a FCB are linked together
150 // each CCB is associated with a file object
151 PFILE_OBJECT PtrFileObject
;
152 // flags (see below) associated with this CCB
154 // current byte offset is required sometimes
155 LARGE_INTEGER CurrentByteOffset
;
156 // if this CCB represents a directory object open, we may
157 // need to maintain a search pattern
159 // PSTRING DirectorySearchPattern;
160 UNICODE_STRING DirectorySearchPattern
;
162 // The full path name for the file...
163 UNICODE_STRING AbsolutePathName
;
165 // Rename/Link Target file name
166 // Used only in a Rename/Link operation
167 UNICODE_STRING RenameLinkTargetFileName
;
169 // we must maintain user specified file time values
170 uint32 UserSpecifiedTime
;
173 } Ext2CCB
, *PtrExt2CCB
;
176 /**************************************************************************
177 the following CCBFlags values are relevant. These flag
178 values are bit fields; therefore we can test whether
179 a bit position is set (1) or not set (0).
180 **************************************************************************/
182 // some on-disk file/directories are opened by EXT2 itself
183 // as opposed to being opened on behalf of a user process
184 #define EXT2_CCB_OPENED_BY_EXT2 (0x00000001)
185 // the file object specified synchronous access at create/open time.
186 // this implies that EXT2 must maintain the current byte offset
187 #define EXT2_CCB_OPENED_FOR_SYNC_ACCESS (0x00000002)
188 // file object specified sequential access for this file
189 #define EXT2_CCB_OPENED_FOR_SEQ_ACCESS (0x00000004)
190 // the CCB has had an IRP_MJ_CLEANUP issued on it. we must
191 // no longer allow the file object / CCB to be used in I/O requests.
192 #define EXT2_CCB_CLEANED (0x00000008)
193 // if we were invoked via the fast i/o path to perform file i/o;
194 // we should set the CCB access/modification time at cleanup
195 #define EXT2_CCB_ACCESSED (0x00000010)
196 #define EXT2_CCB_MODIFIED (0x00000020)
197 // if an application process set the file date time, we must
198 // honor that request and *not* overwrite the values at cleanup
199 #define EXT2_CCB_ACCESS_TIME_SET (0x00000040)
200 #define EXT2_CCB_MODIFY_TIME_SET (0x00000080)
201 #define EXT2_CCB_CREATE_TIME_SET (0x00000100)
203 #define EXT2_CCB_NOT_FROM_ZONE (0x80000000)
205 // this CCB was allocated for a "volume open" operation
206 #define EXT2_CCB_VOLUME_OPEN (0x00000100)
208 /**************************************************************************
209 each open file/directory/volume is represented by a file control block.
210 NOTE: Currently, EXT2 does not handle multiply linked files correctly.
211 In your FSD implementation, you must be careful about handling
212 such on-disk files correctly i.e. a single (unique) FCB must
213 represent an on-disk file/directory regardless of the path used
214 to access the on-disk object.
215 With the current EXT2 implementation, an on-disk file object
216 with more than a single (hard) link will be treated incorrectly!
218 Each FCB can logically be divided into two:
219 (a) a structure that must have a field of type FSRTL_COMMON_FCB_HEADER
220 as the first field in the structure.
221 This portion should also contain other structures/resources required
222 by the NT Cache Manager
223 We will call this structure the "NT Required" FCB. Note that this
224 portion of the FCB must be allocated from non-paged pool.
225 (b) the remainder of the FCB is dependent upon the particular FSD
227 This portion of the FCB could possibly be allocated from paged
228 memory, though in the sample FSD, it will always be allocated
231 FCB structures are protected by the MainResource as well as the
232 PagingIoResource. Of course, if your FSD implementation requires
233 it, you can associate other syncronization structures with the
236 This structure must be quad-word aligned because it is zone allocated.
237 **************************************************************************/
238 typedef struct _Ext2NTRequiredFCB
240 FSRTL_COMMON_FCB_HEADER CommonFCBHeader
;
241 SECTION_OBJECT_POINTERS SectionObject
;
242 ERESOURCE MainResource
;
243 ERESOURCE PagingIoResource
;
244 } Ext2NTRequiredFCB
, *PtrExt2NTRequiredFCB
;
246 typedef struct _Ext2DiskDependentFCB
248 // although the sample FSD does not maintain on-disk data structures,
249 // this structure serves as a reminder of the logical separation that
250 // your FSD can maintain between the disk dependent and the disk
251 // independent portions of the FCB.
252 uint16 DummyField
; // placeholder
253 } Ext2DiskDependentFCB
, *PtrExt2DiskDependentFCB
;
255 typedef struct _Ext2FileControlBlock
257 Ext2Identifier NodeIdentifier
;
258 // we will go ahead and embed the "NT Required FCB" right here.
259 // Note though that it is just as acceptable to simply allocate
260 // memory separately for the other half of the FCB and store a
261 // pointer to the "NT Required" portion here instead of embedding
263 Ext2NTRequiredFCB NTRequiredFCB
;
264 // the disk dependent portion of the FCB is embedded right here
265 Ext2DiskDependentFCB DiskDependentFCB
;
266 // this FCB belongs to some mounted logical volume
267 struct _Ext2VolumeControlBlock
*PtrVCB
;
268 // to be able to access all open file(s) for a volume, we will
269 // link all FCB structures for a logical volume together
272 // to be used if this FCB is on the Closable FCB List...
275 LIST_ENTRY ClosableFCBList
;
276 BOOLEAN OnClosableFCBList
;
279 // some state information for the FCB is maintained using the
282 // all CCB's for this particular FCB are linked off the following
284 LIST_ENTRY CCBListHead
;
285 // NT requires that a file system maintain and honor the various
286 // SHARE_ACCESS modes ...
287 SHARE_ACCESS FCBShareAccess
;
288 // to identify the lazy writer thread(s) we will grab and store
289 // the thread id here when a request to acquire resource(s)
291 uint32 LazyWriterThreadID
;
292 // whenever a file stream has a create/open operation performed,
293 // the Reference count below is incremented AND the OpenHandle count
294 // below is also incremented.
295 // When an IRP_MJ_CLEANUP is received, the OpenHandle count below
297 // When an IRP_MJ_CLOSE is received, the Reference count below is
299 // When the Reference count goes down to zero, the FCB can be de-allocated.
300 // Note that a zero Reference count implies a zero OpenHandle count.
301 // This invariant must always hold true ... (if it is really an invariant,
302 // shoudn't the previous statement be redundant ... hmmm!!!)
304 LONG OpenHandleCount
;
305 // for the sample fsd, there exists a 1-1 correspondence between an
306 // object name structure and a FCB
307 PtrExt2ObjectName FCBName
;
308 // we will maintain some time information here to make our life easier
309 LARGE_INTEGER CreationTime
;
310 LARGE_INTEGER LastAccessTime
;
311 LARGE_INTEGER LastWriteTime
;
312 // Byte-range file lock support (we roll our own)
313 Ext2FileLockAnchor FCBByteRangeLock
;
314 // The OPLOCK support package requires the following structure
317 // The I-Node no of this file / folder
320 // Pointers to blocks
321 uint32 IBlock
[EXT2_N_BLOCKS
];
328 PFILE_OBJECT PtrDirFileObject
;
333 PFILE_OBJECT PtrDirFileObject
;
334 // FCB specific stuff go here...
339 } Ext2FCB
, *PtrExt2FCB
, Ext2DCB
, *PtrExt2DCB
;
341 /**************************************************************************
342 the following FCBFlags values are relevant. These flag
343 values are bit fields; therefore we can test whether
344 a bit position is set (1) or not set (0).
345 **************************************************************************/
346 #define EXT2_FCB_IN_INIT (0x00000001)
347 #define EXT2_FCB_IN_TEARDOWN (0x00000002)
348 #define EXT2_FCB_PAGE_FILE (0x00000004)
349 #define EXT2_FCB_DIRECTORY (0x00000008)
350 #define EXT2_FCB_ROOT_DIRECTORY (0x00000018)
351 #define EXT2_FCB_WRITE_THROUGH (0x00000020)
352 #define EXT2_FCB_MAPPED (0x00000040)
353 #define EXT2_FCB_FAST_IO_READ_IN_PROGESS (0x00000080)
354 #define EXT2_FCB_FAST_IO_WRITE_IN_PROGESS (0x00000100)
355 #define EXT2_FCB_DELETE_ON_CLOSE (0x00000200)
356 #define EXT2_FCB_MODIFIED (0x00000400)
357 #define EXT2_FCB_ACCESSED (0x00000800)
358 #define EXT2_FCB_READ_ONLY (0x00001000)
360 #define EXT2_INITIALIZED_MAIN_RESOURCE (0x00002000)
361 #define EXT2_INITIALIZED_PAGING_IO_RESOURCE (0x00004000)
362 #define EXT2_FCB_BLOCKS_INITIALIZED (0x00008000)
363 #define EXT2_FCB_SPECIAL_FILE (0x00010000)
364 #define EXT2_FCB_HIDDEN_FILE (0x00020000)
365 #define EXT2_FCB_NOT_FROM_ZONE (0x80000000)
368 typedef struct _GroupDescriptors
370 uint32 InodeTablesBlock
; /* Inodes table block => bg_inode_table */
371 uint32 InodeBitmapBlock
; /* Inodes bitmap block => bg_inode_bitmap */
372 uint32 BlockBitmapBlock
; /* Blocks bitmap block => bg_block_bitmap */
373 uint32 FreeBlocksCount
;
374 uint32 FreeInodesCount
;
375 }Ext2GroupDescriptors
, *PtrExt2GroupDescriptors
;
379 /**************************************************************************
380 A logical volume is represented using the following structure.
381 This structure is allocated as part of the device extension
382 for a device object that this sample FSD will create, to represent
383 the mounted logical volume.
385 NOTE: If you were to extend this sample FSD to be a "real" FSD,
386 you would be worried about allocated clusters/sectiors,
387 bitmaps providing such information for the mounted volume,
388 dirty/modified clusters/sectiors etc.
389 This sample FSD does not maintain such information in the
390 in-memory VCB, though you may wish to consider it.
391 **************************************************************************/
392 typedef struct _Ext2VolumeControlBlock
394 Ext2Identifier NodeIdentifier
;
396 // Required to use the Cache Manager.
397 FSRTL_COMMON_FCB_HEADER CommonVCBHeader
;
398 SECTION_OBJECT_POINTERS SectionObject
;
399 // a resource to protect the fields contained within the VCB
400 ERESOURCE VCBResource
;
402 // a resource to synchronise paging io
403 ERESOURCE PagingIoResource
;
405 // Pointer to a stream file object created for the volume information
406 // to be more easily read from secondary storage (with the support of
407 // the NT Cache Manager).
408 PFILE_OBJECT PtrStreamFileObject
;
410 // each VCB is accessible off a global linked list
413 // each VCB points to a VPB structure created by the NT I/O Manager
416 // a set of flags that might mean something useful
419 // A count of the number of open files/directories
420 // As long as the count is != 0, the volume cannot
421 // be dismounted or locked.
424 // a global list of all FCB structures associated with the VCB
425 LIST_ENTRY FCBListHead
;
428 // a list of FCBs created at the FSD's initiative...
429 // These FCBs have a reference count of 0
430 // This list should never be allowed to cross a limit...
432 struct Ext2ClosableFCB
434 LIST_ENTRY ClosableFCBListHead
;
437 // we will maintain a global list of IRP's that are pending
438 // because of a directory notify request.
439 LIST_ENTRY NextNotifyIRP
;
440 // the above list is protected only by the mutex declared below
441 KMUTEX NotifyIRPMutex
;
442 // for each mounted volume, we create a device object. Here then
443 // is a back pointer to that device object
444 PDEVICE_OBJECT VCBDeviceObject
;
445 // We also retain a pointer to the physical device object on which we
446 // have mounted ourselves. The I/O Manager passes us a pointer to this
447 // device object when requesting a mount operation.
448 PDEVICE_OBJECT TargetDeviceObject
;
449 // the volume structure contains a pointer to the root directory FCB
450 PtrExt2FCB PtrRootDirectoryFCB
;
451 // the complete name of the user visible drive letter we serve
452 uint8
*PtrVolumePath
;
453 // For volume open operations, we do not create a FCB (we use the VCB
454 // directly instead). Therefore, all CCB structures for the volume
455 // open operation are linked directly off the VCB
456 LIST_ENTRY VolumeOpenListHead
;
459 // Volume information
462 ULONG ReservedBlocksCount
;
463 ULONG FreeBlocksCount
;
464 ULONG FreeInodesCount
;
465 ULONG LogBlockSize
; // Block size = 1024 << LogBlockSize
468 // Group Information Saved up in the VCB...
469 PtrExt2GroupDescriptors PtrGroupDescriptors
;
472 uint32 InodesPerGroup
;
473 uint32 BlocksPerGroup
;
475 } Ext2VCB
, *PtrExt2VCB
;
477 // some valid flags for the VCB
478 #define EXT2_VCB_FLAGS_VOLUME_MOUNTED (0x00000001)
479 #define EXT2_VCB_FLAGS_VOLUME_LOCKED (0x00000002)
480 #define EXT2_VCB_FLAGS_BEING_DISMOUNTED (0x00000004)
481 #define EXT2_VCB_FLAGS_SHUTDOWN (0x00000008)
482 #define EXT2_VCB_FLAGS_VOLUME_READ_ONLY (0x00000010)
484 #define EXT2_VCB_FLAGS_VCB_INITIALIZED (0x00000020)
486 typedef struct _EXT2_IO_CONTEXT
488 Ext2Identifier NodeIdentifier
;
489 ULONG ReadWriteLength
;
492 PKEVENT PtrSyncEvent
;
494 } EXT2_IO_CONTEXT
, *PEXT2_IO_CONTEXT
;
497 typedef struct _Ext2SavedBCBs
499 Ext2Identifier NodeIdentifier
;
501 LIST_ENTRY SavedBCBsListEntry
;
503 } EXT2_SAVED_BCBS
, *PEXT2_SAVED_BCBS
;
506 /**************************************************************************
507 The IRP context encapsulates the current request. This structure is
508 used in the "common" dispatch routines invoked either directly in
509 the context of the original requestor, or indirectly in the context
510 of a system worker thread.
511 **************************************************************************/
512 typedef struct _Ext2IrpContext
514 Ext2Identifier NodeIdentifier
;
515 uint32 IrpContextFlags
;
516 // copied from the IRP
518 // copied from the IRP
521 // to queue this IRP for asynchronous processing
522 WORK_QUEUE_ITEM WorkQueueItem
;
523 // the IRP for which this context structure was created
525 // the target of the request (obtained from the IRP)
526 PDEVICE_OBJECT TargetDeviceObject
;
527 // if an exception occurs, we will store the code here
528 NTSTATUS SavedExceptionCode
;
530 // This list entry is used if asnchronous processing is required...
531 LIST_ENTRY ThreadQueueListEntry
;
533 // This list entry is used if BCBs are to be saved and then flushed...
534 // Could have been put somewhere else...
535 LIST_ENTRY SavedBCBsListHead
;
538 } Ext2IrpContext
, *PtrExt2IrpContext
;
540 #define EXT2_IRP_CONTEXT_CAN_BLOCK (0x00000001)
541 #define EXT2_IRP_CONTEXT_WRITE_THROUGH (0x00000002)
542 #define EXT2_IRP_CONTEXT_EXCEPTION (0x00000004)
543 #define EXT2_IRP_CONTEXT_DEFERRED_WRITE (0x00000008)
544 #define EXT2_IRP_CONTEXT_ASYNC_PROCESSING (0x00000010)
545 #define EXT2_IRP_CONTEXT_NOT_TOP_LEVEL (0x00000020)
547 #define EXT2_IRP_CONTEXT_NOT_FROM_ZONE (0x80000000)
549 typedef struct _Ext2ThreadQueue
551 HANDLE QueueHandlerThread
;
553 LIST_ENTRY ThreadQueueListHead
; // This holds the Contexts
554 // that are to be scheduled
555 KSPIN_LOCK SpinLock
; // To synchronize access to
557 KEVENT QueueEvent
; // The Worker thread queue
558 // package waits on this event
561 /**************************************************************************
562 we will store all of our global variables in one structure.
563 Global variables are not specific to any mounted volume BUT
564 by definition are required for successful operation of the
566 **************************************************************************/
567 typedef struct _Ext2Data
569 Ext2Identifier NodeIdentifier
;
570 // the fields in this list are protected by the following resource
571 ERESOURCE GlobalDataResource
;
572 // each driver has a driver object created for it by the NT I/O Mgr.
573 // we are no exception to this rule.
574 PDRIVER_OBJECT Ext2DriverObject
;
575 // we will create a device object for our FSD as well ...
576 // Although not really required, it helps if a helper application
577 // writen by us wishes to send us control information via
578 // IOCTL requests ...
579 PDEVICE_OBJECT Ext2DeviceObject
;
580 // we will keep a list of all logical volumes for our sample FSD
582 // the NT Cache Manager, the I/O Manager and we will conspire
583 // to bypass IRP usage using the function pointers contained
584 // in the following structure
585 FAST_IO_DISPATCH Ext2FastIoDispatch
;
586 // The NT Cache Manager uses the following call backs to ensure
587 // correct locking hierarchy is maintained
588 CACHE_MANAGER_CALLBACKS CacheMgrCallBacks
;
589 // structures allocated from a zone need some fields here. Note
590 // that under version 4.0, it might be better to use lookaside
592 KSPIN_LOCK ZoneAllocationSpinLock
;
593 ZONE_HEADER ObjectNameZoneHeader
;
594 ZONE_HEADER CCBZoneHeader
;
595 ZONE_HEADER FCBZoneHeader
;
596 ZONE_HEADER ByteLockZoneHeader
;
597 ZONE_HEADER IrpContextZoneHeader
;
598 void *ObjectNameZone
;
602 void *IrpContextZone
;
604 // currently, there is a single default zone size value used for
605 // all zones. This should ideally be changed by you to be 1 per
606 // type of zone (e.g. a default size for the FCB zone might be
607 // different from the default size for the ByteLock zone).
609 // Of course, you will need to use different values (min/max)
610 // for lookaside lists (if you decide to use them instead)
611 uint32 DefaultZoneSizeInNumStructs
;
613 // some state information is maintained in the flags field
616 // Handle returned by the MUP is stored here.
620 LARGE_INTEGER TimeDiff
;
622 // The Worker Thread package uses this structure...
623 Ext2ThreadQueue ThreadQueue
;
625 }Ext2Data
, *PtrExt2Data
;
627 // valid flag values for the global data structure
628 #define EXT2_DATA_FLAGS_RESOURCE_INITIALIZED (0x00000001)
629 #define EXT2_DATA_FLAGS_ZONES_INITIALIZED (0x00000002)
631 // a default size of the number of pages of non-paged pool allocated
632 // for each of the zones ...
634 // Note that the values are absolutely arbitrary, the only information
635 // worth using from the values themselves is that they increase for
636 // larger systems (i.e. systems with more memory)
637 #define EXT2_DEFAULT_ZONE_SIZE_SMALL_SYSTEM (0x4)
638 #define EXT2_DEFAULT_ZONE_SIZE_MEDIUM_SYSTEM (0x8)
639 #define EXT2_DEFAULT_ZONE_SIZE_LARGE_SYSTEM (0xc)
641 // another simplistic (brain dead ? :-) method used is to simply double
642 // the values for a "server" machine
644 // So, for all you guys who "modified" the registry ;-) to change the
645 // wkstation into a server, tough luck !
646 #define EXT2_NTAS_MULTIPLE (0x2)
648 /***************************************************************************
649 The following locking hierarchy is maintained in this sample filesystem
652 (a) the global structure resource can be acquired at any time. However,
653 it is an "end resource" i.e. once acquired, no other resource can
654 be obtained until the global structure resource is released.
655 (b) the logical volume resource must be acquired (if required) before
656 any of the other resources are acquired.
657 (c) a file control block can be acquired next (if required). If two
658 FCB structures need to be acquired, the FCB "higher" in the directory
659 tree must be acquired first.
660 For a FCB, the "main resource" must be acquired first before a
661 "paging i/o" resource is acquired.
663 Whenever a file is opened, the logical volume structure is referenced.
664 This ensures that the volume cannot be dismounted while any file is open.
666 ***************************************************************************/
668 typedef struct _IO_RUN
673 PIRP PtrAssociatedIrp
;
675 } EXT2_IO_RUN
, *PEXT2_IO_RUN
;
677 typedef struct _SIBlocks
681 } EXT2_SIBLOCKS
, *PEXT2_SIBLOCKS
;
683 #endif // has this file been included?