xref: /reactos/sdk/include/ddk/fcb.h (revision 420c0360)
1c2c66affSColin Finck #ifndef _FCB_STRUCTS_DEFINED_
2c2c66affSColin Finck #define _FCB_STRUCTS_DEFINED_
3c2c66affSColin Finck 
4c2c66affSColin Finck #include "buffring.h"
5c2c66affSColin Finck 
6c2c66affSColin Finck struct _FCB_INIT_PACKET;
7c2c66affSColin Finck typedef struct _FCB_INIT_PACKET *PFCB_INIT_PACKET;
8c2c66affSColin Finck 
9c2c66affSColin Finck typedef struct _SRV_CALL
10c2c66affSColin Finck {
11c2c66affSColin Finck     union
12c2c66affSColin Finck     {
13c2c66affSColin Finck         MRX_SRV_CALL;
14c2c66affSColin Finck         struct
15c2c66affSColin Finck         {
16c2c66affSColin Finck             MRX_NORMAL_NODE_HEADER spacer;
17c2c66affSColin Finck         };
18c2c66affSColin Finck     };
19c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
20c2c66affSColin Finck     RX_PREFIX_ENTRY PrefixEntry;
21c2c66affSColin Finck     RX_BLOCK_CONDITION Condition;
22c2c66affSColin Finck     ULONG SerialNumberForEnum;
23c2c66affSColin Finck     volatile LONG NumberOfCloseDelayedFiles;
24c2c66affSColin Finck     LIST_ENTRY TransitionWaitList;
25c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
26c2c66affSColin Finck     PURGE_SYNCHRONIZATION_CONTEXT PurgeSyncronizationContext;
27c2c66affSColin Finck     RX_BUFFERING_MANAGER BufferingManager;
28c2c66affSColin Finck } SRV_CALL, *PSRV_CALL;
29c2c66affSColin Finck 
30c2c66affSColin Finck #define NETROOT_FLAG_FINALIZATION_IN_PROGRESS 0x00040000
31c2c66affSColin Finck #define NETROOT_FLAG_NAME_ALREADY_REMOVED 0x00080000
32c2c66affSColin Finck 
33c2c66affSColin Finck typedef struct _NET_ROOT
34c2c66affSColin Finck {
35c2c66affSColin Finck     union
36c2c66affSColin Finck     {
37c2c66affSColin Finck         MRX_NET_ROOT;
38c2c66affSColin Finck         struct
39c2c66affSColin Finck         {
40c2c66affSColin Finck             MRX_NORMAL_NODE_HEADER spacer;
41c2c66affSColin Finck             PSRV_CALL SrvCall;
42c2c66affSColin Finck         };
43c2c66affSColin Finck     };
44c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
45c2c66affSColin Finck     RX_BLOCK_CONDITION Condition;
46c2c66affSColin Finck     LIST_ENTRY TransitionWaitList;
47c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
48c2c66affSColin Finck     PURGE_SYNCHRONIZATION_CONTEXT PurgeSyncronizationContext;
49c2c66affSColin Finck     PV_NET_ROOT DefaultVNetRoot;
50c2c66affSColin Finck     LIST_ENTRY VirtualNetRoots;
51c2c66affSColin Finck     ULONG NumberOfVirtualNetRoots;
52c2c66affSColin Finck     ULONG SerialNumberForEnum;
53c2c66affSColin Finck     RX_PREFIX_ENTRY PrefixEntry;
54c2c66affSColin Finck     RX_FCB_TABLE FcbTable;
55c2c66affSColin Finck } NET_ROOT, *PNET_ROOT;
56c2c66affSColin Finck 
57c2c66affSColin Finck typedef struct _V_NET_ROOT
58c2c66affSColin Finck {
59c2c66affSColin Finck     union
60c2c66affSColin Finck     {
61c2c66affSColin Finck         MRX_V_NET_ROOT;
62c2c66affSColin Finck         struct
63c2c66affSColin Finck         {
64c2c66affSColin Finck             MRX_NORMAL_NODE_HEADER spacer;
65c2c66affSColin Finck             PNET_ROOT NetRoot;
66c2c66affSColin Finck         };
67c2c66affSColin Finck     };
68c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
69c2c66affSColin Finck     BOOLEAN ConnectionFinalizationDone;
70c2c66affSColin Finck     RX_BLOCK_CONDITION Condition;
71c2c66affSColin Finck     volatile LONG AdditionalReferenceForDeleteFsctlTaken;
72c2c66affSColin Finck     RX_PREFIX_ENTRY PrefixEntry;
73c2c66affSColin Finck     UNICODE_STRING NamePrefix;
74c2c66affSColin Finck     ULONG PrefixOffsetInBytes;
75c2c66affSColin Finck     LIST_ENTRY NetRootListEntry;
76c2c66affSColin Finck     ULONG SerialNumberForEnum;
77c2c66affSColin Finck     LIST_ENTRY TransitionWaitList;
78c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
79c2c66affSColin Finck } V_NET_ROOT, *PV_NET_ROOT;
80c2c66affSColin Finck 
81c2c66affSColin Finck typedef struct _NON_PAGED_FCB
82c2c66affSColin Finck {
83c2c66affSColin Finck     NODE_TYPE_CODE NodeTypeCode;
84c2c66affSColin Finck     NODE_BYTE_SIZE NodeByteSize;
85c2c66affSColin Finck     SECTION_OBJECT_POINTERS SectionObjectPointers;
86c2c66affSColin Finck     ERESOURCE HeaderResource;
87c2c66affSColin Finck     ERESOURCE PagingIoResource;
88c2c66affSColin Finck #ifdef USE_FILESIZE_LOCK
89c2c66affSColin Finck     FAST_MUTEX FileSizeLock;
90c2c66affSColin Finck #endif
91c2c66affSColin Finck     LIST_ENTRY TransitionWaitList;
92c2c66affSColin Finck     ULONG OutstandingAsyncWrites;
93c2c66affSColin Finck     PKEVENT OutstandingAsyncEvent;
94c2c66affSColin Finck     KEVENT TheActualEvent;
95c2c66affSColin Finck     PVOID MiniRdrContext[2];
96c2c66affSColin Finck     FAST_MUTEX AdvancedFcbHeaderMutex;
97c2c66affSColin Finck     ERESOURCE BufferedLocksResource;
98c2c66affSColin Finck #if DBG
99c2c66affSColin Finck     PFCB FcbBackPointer;
100c2c66affSColin Finck #endif
101c2c66affSColin Finck } NON_PAGED_FCB, *PNON_PAGED_FCB;
102c2c66affSColin Finck 
103c2c66affSColin Finck typedef enum _RX_FCBTRACKER_CASES
104c2c66affSColin Finck {
105c2c66affSColin Finck     RX_FCBTRACKER_CASE_NORMAL,
106c2c66affSColin Finck     RX_FCBTRACKER_CASE_NULLCONTEXT,
107c2c66affSColin Finck     RX_FCBTRACKER_CASE_CBS_CONTEXT,
108c2c66affSColin Finck     RX_FCBTRACKER_CASE_CBS_WAIT_CONTEXT,
109c2c66affSColin Finck     RX_FCBTRACKER_CASE_MAXIMUM
110c2c66affSColin Finck } RX_FCBTRACKER_CASES;
111c2c66affSColin Finck 
112c2c66affSColin Finck typedef struct _FCB_LOCK
113c2c66affSColin Finck {
114c2c66affSColin Finck     struct _FCB_LOCK * Next;
115c2c66affSColin Finck     LARGE_INTEGER Length;
116c2c66affSColin Finck     LARGE_INTEGER BytesOffset;
117c2c66affSColin Finck     ULONG Key;
118c2c66affSColin Finck     BOOLEAN ExclusiveLock;
119c2c66affSColin Finck } FCB_LOCK, *PFCB_LOCK;
120c2c66affSColin Finck 
121c2c66affSColin Finck typedef struct _FCB_BUFFERED_LOCKS
122c2c66affSColin Finck {
123c2c66affSColin Finck     struct _FCB_LOCK * List;
124c2c66affSColin Finck     volatile ULONG PendingLockOps;
125c2c66affSColin Finck     PERESOURCE Resource;
126c2c66affSColin Finck } FCB_BUFFERED_LOCKS, *PFCB_BUFFERED_LOCKS;
127c2c66affSColin Finck 
128c2c66affSColin Finck typedef struct _FCB
129c2c66affSColin Finck {
130c2c66affSColin Finck     union
131c2c66affSColin Finck     {
132c2c66affSColin Finck         MRX_FCB;
133c2c66affSColin Finck         struct
134c2c66affSColin Finck         {
135c2c66affSColin Finck             FSRTL_ADVANCED_FCB_HEADER spacer;
136c2c66affSColin Finck             PNET_ROOT NetRoot;
137c2c66affSColin Finck         };
138c2c66affSColin Finck     };
139c2c66affSColin Finck     PV_NET_ROOT VNetRoot;
140c2c66affSColin Finck     PNON_PAGED_FCB NonPaged;
141c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
142c2c66affSColin Finck     PKEVENT pBufferingStateChangeCompletedEvent;
143c2c66affSColin Finck     LONG NumberOfBufferingStateChangeWaiters;
144c2c66affSColin Finck     RX_FCB_TABLE_ENTRY FcbTableEntry;
145c2c66affSColin Finck     UNICODE_STRING PrivateAlreadyPrefixedName;
146c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
147c2c66affSColin Finck     RX_BLOCK_CONDITION Condition;
148c2c66affSColin Finck     PRX_FSD_DISPATCH_VECTOR PrivateDispatchVector;
149c2c66affSColin Finck     PRDBSS_DEVICE_OBJECT RxDeviceObject;
150c2c66affSColin Finck     PMINIRDR_DISPATCH MRxDispatch;
151c2c66affSColin Finck     PFAST_IO_DISPATCH MRxFastIoDispatch;
152c2c66affSColin Finck     PSRV_OPEN InternalSrvOpen;
153c2c66affSColin Finck     PFOBX InternalFobx;
154c2c66affSColin Finck     SHARE_ACCESS ShareAccess;
155c2c66affSColin Finck     SHARE_ACCESS ShareAccessPerSrvOpens;
156c2c66affSColin Finck     ULONG NumberOfLinks;
157c2c66affSColin Finck     LARGE_INTEGER CreationTime;
158c2c66affSColin Finck     LARGE_INTEGER LastAccessTime;
159c2c66affSColin Finck     LARGE_INTEGER LastWriteTime;
160c2c66affSColin Finck     LARGE_INTEGER LastChangeTime;
161c2c66affSColin Finck #if (_WIN32_WINNT < 0x0600)
162c2c66affSColin Finck     PETHREAD CreateSectionThread;
163c2c66affSColin Finck #endif
164c2c66affSColin Finck     ULONG ulFileSizeVersion;
165c2c66affSColin Finck #if (_WIN32_WINNT < 0x0600)
166c2c66affSColin Finck     union
167c2c66affSColin Finck     {
168c2c66affSColin Finck         struct
169c2c66affSColin Finck         {
170c2c66affSColin Finck #endif
171c2c66affSColin Finck         FILE_LOCK FileLock;
172c2c66affSColin Finck #if (_WIN32_WINNT < 0x0600)
173c2c66affSColin Finck         PVOID LazyWriteThread;
174c2c66affSColin Finck #endif
175c2c66affSColin Finck         union
176c2c66affSColin Finck         {
177c2c66affSColin Finck             LOWIO_PER_FCB_INFO;
178c2c66affSColin Finck             LOWIO_PER_FCB_INFO LowIoPerFcbInfo;
179c2c66affSColin Finck         };
180c2c66affSColin Finck #ifdef USE_FILESIZE_LOCK
181c2c66affSColin Finck         PFAST_MUTEX FileSizeLock;
182c2c66affSColin Finck #endif
183c2c66affSColin Finck #if (_WIN32_WINNT < 0x0600)
184c2c66affSColin Finck         } Fcb;
185c2c66affSColin Finck     } Specific;
186c2c66affSColin Finck #endif
187c2c66affSColin Finck     ULONG EaModificationCount;
188c2c66affSColin Finck     FCB_BUFFERED_LOCKS BufferedLocks;
189c2c66affSColin Finck #if DBG
190c2c66affSColin Finck     PNON_PAGED_FCB CopyOfNonPaged;
191c2c66affSColin Finck #endif
192c2c66affSColin Finck #ifdef RDBSS_TRACKER
193c2c66affSColin Finck     ULONG FcbAcquires[RX_FCBTRACKER_CASE_MAXIMUM];
194c2c66affSColin Finck     ULONG FcbReleases[RX_FCBTRACKER_CASE_MAXIMUM];
195c2c66affSColin Finck #else
196c2c66affSColin Finck #error tracker must be defined
197c2c66affSColin Finck #endif
198c2c66affSColin Finck     PCHAR PagingIoResourceFile;
199c2c66affSColin Finck     ULONG PagingIoResourceLine;
200c2c66affSColin Finck } FCB, *PFCB;
201c2c66affSColin Finck 
202c2c66affSColin Finck #define FCB_STATE_DELETE_ON_CLOSE 0x00000001
203c2c66affSColin Finck #define FCB_STATE_TRUNCATE_ON_CLOSE 0x00000002
204c2c66affSColin Finck #define FCB_STATE_PAGING_FILE 0x00000004
205c2c66affSColin Finck #define FCB_STATE_DISABLE_LOCAL_BUFFERING 0x00000010
206c2c66affSColin Finck #define FCB_STATE_TEMPORARY 0x00000020
207c2c66affSColin Finck #define FCB_STATE_BUFFERING_STATE_CHANGE_PENDING 0x00000040
208c2c66affSColin Finck #define FCB_STATE_ORPHANED 0x00000080
209c2c66affSColin Finck #define FCB_STATE_READAHEAD_DEFERRED 0x00000100
210c2c66affSColin Finck #define FCB_STATE_DELAY_CLOSE 0x00000800
211c2c66affSColin Finck #define FCB_STATE_FAKEFCB 0x00001000
212c2c66affSColin Finck #define FCB_STATE_FILE_IS_BUF_COMPRESSED 0x00004000
213c2c66affSColin Finck #define FCB_STATE_FILE_IS_DISK_COMPRESSED 0x00008000
214c2c66affSColin Finck #define FCB_STATE_FILE_IS_SHADOWED 0x00010000
215c2c66affSColin Finck #define FCB_STATE_BUFFERSTATE_CHANGING 0x00002000
216c2c66affSColin Finck #define FCB_STATE_SPECIAL_PATH 0x00020000
217c2c66affSColin Finck #define FCB_STATE_TIME_AND_SIZE_ALREADY_SET 0x00040000
218c2c66affSColin Finck #define FCB_STATE_FILETIMECACHEING_ENABLED 0x00080000
219c2c66affSColin Finck #define FCB_STATE_FILESIZECACHEING_ENABLED 0x00100000
220c2c66affSColin Finck #define FCB_STATE_LOCK_BUFFERING_ENABLED 0x00200000
221c2c66affSColin Finck #define FCB_STATE_COLLAPSING_ENABLED 0x00400000
222c2c66affSColin Finck #define FCB_STATE_OPENSHARING_ENABLED 0x00800000
223c2c66affSColin Finck #define FCB_STATE_READBUFFERING_ENABLED 0x01000000
224c2c66affSColin Finck #define FCB_STATE_READCACHING_ENABLED 0x02000000
225c2c66affSColin Finck #define FCB_STATE_WRITEBUFFERING_ENABLED 0x04000000
226c2c66affSColin Finck #define FCB_STATE_WRITECACHING_ENABLED 0x08000000
227c2c66affSColin Finck #define FCB_STATE_NAME_ALREADY_REMOVED 0x10000000
228c2c66affSColin Finck #define FCB_STATE_ADDEDBACKSLASH 0x20000000
229c2c66affSColin Finck #define FCB_STATE_FOBX_USED 0x40000000
230c2c66affSColin Finck #define FCB_STATE_SRVOPEN_USED 0x80000000
231c2c66affSColin Finck 
232c2c66affSColin Finck #define FCB_STATE_BUFFERING_STATE_MASK     \
233c2c66affSColin Finck     ((FCB_STATE_WRITECACHING_ENABLED       \
234c2c66affSColin Finck       | FCB_STATE_WRITEBUFFERING_ENABLED   \
235c2c66affSColin Finck       | FCB_STATE_READCACHING_ENABLED      \
236c2c66affSColin Finck       | FCB_STATE_READBUFFERING_ENABLED    \
237c2c66affSColin Finck       | FCB_STATE_OPENSHARING_ENABLED      \
238c2c66affSColin Finck       | FCB_STATE_COLLAPSING_ENABLED       \
239c2c66affSColin Finck       | FCB_STATE_LOCK_BUFFERING_ENABLED   \
240c2c66affSColin Finck       | FCB_STATE_FILESIZECACHEING_ENABLED \
241c2c66affSColin Finck       | FCB_STATE_FILETIMECACHEING_ENABLED))
242c2c66affSColin Finck 
243c2c66affSColin Finck typedef struct _FCB_INIT_PACKET
244c2c66affSColin Finck {
245c2c66affSColin Finck     PULONG pAttributes;
246c2c66affSColin Finck     PULONG pNumLinks;
247c2c66affSColin Finck     PLARGE_INTEGER pCreationTime;
248c2c66affSColin Finck     PLARGE_INTEGER pLastAccessTime;
249c2c66affSColin Finck     PLARGE_INTEGER pLastWriteTime;
250c2c66affSColin Finck     PLARGE_INTEGER pLastChangeTime;
251c2c66affSColin Finck     PLARGE_INTEGER pAllocationSize;
252c2c66affSColin Finck     PLARGE_INTEGER pFileSize;
253c2c66affSColin Finck     PLARGE_INTEGER pValidDataLength;
254c2c66affSColin Finck } FCB_INIT_PACKET;
255c2c66affSColin Finck 
256c2c66affSColin Finck #define SRVOPEN_FLAG_ENCLOSED_ALLOCATED 0x10000
257c2c66affSColin Finck #define SRVOPEN_FLAG_FOBX_USED 0x20000
258c2c66affSColin Finck #define SRVOPEN_FLAG_SHAREACCESS_UPDATED 0x40000
259c2c66affSColin Finck 
260c2c66affSColin Finck typedef struct _SRV_OPEN
261c2c66affSColin Finck {
262c2c66affSColin Finck     union
263c2c66affSColin Finck     {
264c2c66affSColin Finck         MRX_SRV_OPEN;
265c2c66affSColin Finck         struct
266c2c66affSColin Finck         {
267c2c66affSColin Finck             MRX_NORMAL_NODE_HEADER spacer;
268c2c66affSColin Finck             PFCB Fcb;
269c2c66affSColin Finck #if (_WIN32_WINNT >= 0x600)
270c2c66affSColin Finck             PV_NET_ROOT VNetRoot;
271c2c66affSColin Finck #endif
272c2c66affSColin Finck         };
273c2c66affSColin Finck     };
274c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
275c2c66affSColin Finck     RX_BLOCK_CONDITION Condition;
276c2c66affSColin Finck     volatile LONG BufferingToken;
277c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
278c2c66affSColin Finck     LIST_ENTRY TransitionWaitList;
279c2c66affSColin Finck     LIST_ENTRY FobxList;
280c2c66affSColin Finck     PFOBX InternalFobx;
281c2c66affSColin Finck     union
282c2c66affSColin Finck     {
283c2c66affSColin Finck         LIST_ENTRY SrvOpenKeyList;
284c2c66affSColin Finck         ULONG SequenceNumber;
285c2c66affSColin Finck     };
286c2c66affSColin Finck     NTSTATUS OpenStatus;
287c2c66affSColin Finck } SRV_OPEN, *PSRV_OPEN;
288c2c66affSColin Finck 
289c2c66affSColin Finck #define FOBX_FLAG_MATCH_ALL 0x10000
290c2c66affSColin Finck #define FOBX_FLAG_FREE_UNICODE 0x20000
291c2c66affSColin Finck #define FOBX_FLAG_USER_SET_LAST_WRITE 0x40000
292c2c66affSColin Finck #define FOBX_FLAG_USER_SET_LAST_ACCESS 0x80000
293c2c66affSColin Finck #define FOBX_FLAG_USER_SET_CREATION 0x100000
294c2c66affSColin Finck #define FOBX_FLAG_USER_SET_LAST_CHANGE 0x200000
295c2c66affSColin Finck #define FOBX_FLAG_DELETE_ON_CLOSE 0x800000
296c2c66affSColin Finck #define FOBX_FLAG_SRVOPEN_CLOSED 0x1000000
297c2c66affSColin Finck #define FOBX_FLAG_UNC_NAME 0x2000000
298c2c66affSColin Finck #define FOBX_FLAG_ENCLOSED_ALLOCATED 0x4000000
299c2c66affSColin Finck #define FOBX_FLAG_MARKED_AS_DORMANT 0x8000000
300c2c66affSColin Finck #ifdef __REACTOS__
301c2c66affSColin Finck #define FOBX_FLAG_DISABLE_COLLAPSING 0x20000000
302c2c66affSColin Finck #endif
303c2c66affSColin Finck 
304c2c66affSColin Finck typedef struct _FOBX
305c2c66affSColin Finck {
306c2c66affSColin Finck     union
307c2c66affSColin Finck     {
308c2c66affSColin Finck         MRX_FOBX;
309c2c66affSColin Finck         struct
310c2c66affSColin Finck         {
311c2c66affSColin Finck             MRX_NORMAL_NODE_HEADER spacer;
312c2c66affSColin Finck             PSRV_OPEN SrvOpen;
313c2c66affSColin Finck         };
314c2c66affSColin Finck     };
315c2c66affSColin Finck     volatile ULONG FobxSerialNumber;
316c2c66affSColin Finck     LIST_ENTRY FobxQLinks;
317c2c66affSColin Finck     LIST_ENTRY ScavengerFinalizationList;
318c2c66affSColin Finck     LIST_ENTRY ClosePendingList;
319c2c66affSColin Finck     LARGE_INTEGER CloseTime;
320c2c66affSColin Finck     BOOLEAN UpperFinalizationDone;
321c2c66affSColin Finck     BOOLEAN ContainsWildCards;
322c2c66affSColin Finck     BOOLEAN fOpenCountDecremented;
323c2c66affSColin Finck     union
324c2c66affSColin Finck     {
325c2c66affSColin Finck         struct
326c2c66affSColin Finck         {
327c2c66affSColin Finck             union
328c2c66affSColin Finck             {
329c2c66affSColin Finck                 MRX_PIPE_HANDLE_INFORMATION;
330c2c66affSColin Finck                 MRX_PIPE_HANDLE_INFORMATION PipeHandleInformation;
331c2c66affSColin Finck             };
332c2c66affSColin Finck             LARGE_INTEGER CollectDataTime;
333c2c66affSColin Finck             ULONG CollectDataSize;
334c2c66affSColin Finck             THROTTLING_STATE ThrottlingState;
335c2c66affSColin Finck             LIST_ENTRY ReadSerializationQueue;
336c2c66affSColin Finck             LIST_ENTRY WriteSerializationQueue;
337c2c66affSColin Finck         } NamedPipe;
338c2c66affSColin Finck         struct {
339c2c66affSColin Finck             RXVBO PredictedReadOffset;
340c2c66affSColin Finck             RXVBO PredictedWriteOffset;
341c2c66affSColin Finck             THROTTLING_STATE LockThrottlingState;
342c2c66affSColin Finck             LARGE_INTEGER LastLockOffset;
343c2c66affSColin Finck             LARGE_INTEGER LastLockRange;
344c2c66affSColin Finck         } DiskFile;
345c2c66affSColin Finck     } Specific;
346c2c66affSColin Finck     PRDBSS_DEVICE_OBJECT RxDeviceObject;
347c2c66affSColin Finck } FOBX, *PFOBX;
348c2c66affSColin Finck 
349c2c66affSColin Finck #define RDBSS_REF_TRACK_SRVCALL  0x00000001
350c2c66affSColin Finck #define RDBSS_REF_TRACK_NETROOT  0x00000002
351c2c66affSColin Finck #define RDBSS_REF_TRACK_VNETROOT 0x00000004
352c2c66affSColin Finck #define RDBSS_REF_TRACK_NETFOBX  0x00000008
353c2c66affSColin Finck #define RDBSS_REF_TRACK_NETFCB   0x00000010
354c2c66affSColin Finck #define RDBSS_REF_TRACK_SRVOPEN  0x00000020
355c2c66affSColin Finck #define RX_PRINT_REF_TRACKING    0x40000000
356c2c66affSColin Finck #define RX_LOG_REF_TRACKING      0x80000000
357c2c66affSColin Finck 
358c2c66affSColin Finck extern ULONG RdbssReferenceTracingValue;
359c2c66affSColin Finck 
360c2c66affSColin Finck VOID
361c2c66affSColin Finck RxpTrackReference(
362c2c66affSColin Finck     _In_ ULONG TraceType,
363c2c66affSColin Finck     _In_ PCSTR FileName,
364c2c66affSColin Finck     _In_ ULONG Line,
365c2c66affSColin Finck     _In_ PVOID Instance);
366c2c66affSColin Finck 
367c2c66affSColin Finck BOOLEAN
368c2c66affSColin Finck RxpTrackDereference(
369c2c66affSColin Finck     _In_ ULONG TraceType,
370c2c66affSColin Finck     _In_ PCSTR FileName,
371c2c66affSColin Finck     _In_ ULONG Line,
372c2c66affSColin Finck     _In_ PVOID Instance);
373c2c66affSColin Finck 
374c2c66affSColin Finck #define REF_TRACING_ON(TraceMask) (TraceMask & RdbssReferenceTracingValue)
375c2c66affSColin Finck #ifndef __REACTOS__
376c2c66affSColin Finck #define PRINT_REF_COUNT(TYPE, Count)                          \
377c2c66affSColin Finck     if (REF_TRACING_ON( RDBSS_REF_TRACK_ ## TYPE) &&          \
378c2c66affSColin Finck         (RdbssReferenceTracingValue & RX_PRINT_REF_TRACKING)) \
379c2c66affSColin Finck     {                                                         \
380c2c66affSColin Finck         DbgPrint("%ld\n", Count);                             \
381c2c66affSColin Finck     }
382c2c66affSColin Finck #else
383c2c66affSColin Finck #define PRINT_REF_COUNT(TYPE, Count)                                     \
384c2c66affSColin Finck     if (REF_TRACING_ON( RDBSS_REF_TRACK_ ## TYPE) &&                     \
385c2c66affSColin Finck         (RdbssReferenceTracingValue & RX_PRINT_REF_TRACKING))            \
386c2c66affSColin Finck     {                                                                    \
387c2c66affSColin Finck         DbgPrint("(%s:%d) %s: %ld\n", __FILE__, __LINE__, #TYPE, Count); \
388c2c66affSColin Finck     }
389c2c66affSColin Finck #endif
390c2c66affSColin Finck 
391c2c66affSColin Finck #define RxReferenceSrvCall(SrvCall)                                          \
392c2c66affSColin Finck     RxpTrackReference(RDBSS_REF_TRACK_SRVCALL, __FILE__, __LINE__, SrvCall); \
393c2c66affSColin Finck     RxReference(SrvCall)
394c2c66affSColin Finck 
395c2c66affSColin Finck #define RxDereferenceSrvCall(SrvCall, LockHoldingState)                        \
396c2c66affSColin Finck     RxpTrackDereference(RDBSS_REF_TRACK_SRVCALL, __FILE__, __LINE__, SrvCall); \
397c2c66affSColin Finck     RxDereference(SrvCall, LockHoldingState)
398c2c66affSColin Finck 
399c2c66affSColin Finck #define RxReferenceNetRoot(NetRoot)                                          \
400c2c66affSColin Finck     RxpTrackReference(RDBSS_REF_TRACK_NETROOT, __FILE__, __LINE__, NetRoot); \
401c2c66affSColin Finck     RxReference(NetRoot)
402c2c66affSColin Finck 
403c2c66affSColin Finck #define RxDereferenceNetRoot(NetRoot, LockHoldingState)                        \
404c2c66affSColin Finck     RxpTrackDereference(RDBSS_REF_TRACK_NETROOT, __FILE__, __LINE__, NetRoot); \
405c2c66affSColin Finck     RxDereference(NetRoot, LockHoldingState)
406c2c66affSColin Finck 
407c2c66affSColin Finck #define RxReferenceVNetRoot(VNetRoot)                                          \
408c2c66affSColin Finck     RxpTrackReference(RDBSS_REF_TRACK_VNETROOT, __FILE__, __LINE__, VNetRoot); \
409c2c66affSColin Finck     RxReference(VNetRoot)
410c2c66affSColin Finck 
411c2c66affSColin Finck #define RxDereferenceVNetRoot(VNetRoot, LockHoldingState)                        \
412c2c66affSColin Finck     RxpTrackDereference(RDBSS_REF_TRACK_VNETROOT, __FILE__, __LINE__, VNetRoot); \
413c2c66affSColin Finck     RxDereference(VNetRoot, LockHoldingState)
414c2c66affSColin Finck 
415c2c66affSColin Finck #define RxReferenceNetFobx(Fobx)                                          \
416c2c66affSColin Finck     RxpTrackReference(RDBSS_REF_TRACK_NETFOBX, __FILE__, __LINE__, Fobx); \
417c2c66affSColin Finck     RxReference(Fobx)
418c2c66affSColin Finck 
419c2c66affSColin Finck #define RxDereferenceNetFobx(Fobx, LockHoldingState)                        \
420c2c66affSColin Finck     RxpTrackDereference(RDBSS_REF_TRACK_NETFOBX, __FILE__, __LINE__, Fobx); \
421c2c66affSColin Finck     RxDereference(Fobx, LockHoldingState)
422c2c66affSColin Finck 
423c2c66affSColin Finck #define RxReferenceSrvOpen(SrvOpen)                                          \
424c2c66affSColin Finck     RxpTrackReference(RDBSS_REF_TRACK_SRVOPEN, __FILE__, __LINE__, SrvOpen); \
425c2c66affSColin Finck     RxReference(SrvOpen)
426c2c66affSColin Finck 
427c2c66affSColin Finck #define RxDereferenceSrvOpen(SrvOpen, LockHoldingState)                        \
428c2c66affSColin Finck     RxpTrackDereference(RDBSS_REF_TRACK_SRVOPEN, __FILE__, __LINE__, SrvOpen); \
429c2c66affSColin Finck     RxDereference(SrvOpen, LockHoldingState)
430c2c66affSColin Finck 
431c2c66affSColin Finck #define RxReferenceNetFcb(Fcb)                                           \
432c2c66affSColin Finck     (RxpTrackReference(RDBSS_REF_TRACK_NETFCB, __FILE__, __LINE__, Fcb), \
433c2c66affSColin Finck      RxpReferenceNetFcb(Fcb))
434c2c66affSColin Finck 
435c2c66affSColin Finck #define RxDereferenceNetFcb(Fcb)                                                 \
436c2c66affSColin Finck     ((LONG)RxpTrackDereference(RDBSS_REF_TRACK_NETFCB, __FILE__, __LINE__, Fcb), \
437c2c66affSColin Finck      RxpDereferenceNetFcb(Fcb))
438c2c66affSColin Finck 
439c2c66affSColin Finck #define RxDereferenceAndFinalizeNetFcb(Fcb, RxContext, RecursiveFinalize, ForceFinalize)  \
440c2c66affSColin Finck     (RxpTrackDereference(RDBSS_REF_TRACK_NETFCB, __FILE__, __LINE__, Fcb),                \
441c2c66affSColin Finck      RxpDereferenceAndFinalizeNetFcb(Fcb, RxContext, RecursiveFinalize, ForceFinalize))
442c2c66affSColin Finck 
443c2c66affSColin Finck PSRV_CALL
444c2c66affSColin Finck RxCreateSrvCall(
445c2c66affSColin Finck     _In_ PRX_CONTEXT RxContext,
446c2c66affSColin Finck     _In_ PUNICODE_STRING Name,
447c2c66affSColin Finck     _In_opt_ PUNICODE_STRING InnerNamePrefix,
448c2c66affSColin Finck     _In_ PRX_CONNECTION_ID RxConnectionId);
449c2c66affSColin Finck 
450c2c66affSColin Finck #define RxWaitForStableSrvCall(S, R) RxWaitForStableCondition(&(S)->Condition, &(S)->TransitionWaitList, (R), NULL)
451c2c66affSColin Finck #define RxTransitionSrvCall(S, C) RxUpdateCondition((C), &(S)->Condition, &(S)->TransitionWaitList)
452c2c66affSColin Finck 
453c2c66affSColin Finck #if (_WIN32_WINNT >= 0x0600)
454c2c66affSColin Finck BOOLEAN
455c2c66affSColin Finck RxFinalizeSrvCall(
456c2c66affSColin Finck     _Out_ PSRV_CALL ThisSrvCall,
457c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
458c2c66affSColin Finck #else
459c2c66affSColin Finck BOOLEAN
460c2c66affSColin Finck RxFinalizeSrvCall(
461c2c66affSColin Finck     _Out_ PSRV_CALL ThisSrvCall,
462c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
463c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
464c2c66affSColin Finck #endif
465c2c66affSColin Finck 
466c2c66affSColin Finck PNET_ROOT
467c2c66affSColin Finck RxCreateNetRoot(
468c2c66affSColin Finck     _In_ PSRV_CALL SrvCall,
469c2c66affSColin Finck     _In_ PUNICODE_STRING Name,
470c2c66affSColin Finck     _In_ ULONG NetRootFlags,
471c2c66affSColin Finck     _In_opt_ PRX_CONNECTION_ID RxConnectionId);
472c2c66affSColin Finck 
473c2c66affSColin Finck #define RxWaitForStableNetRoot(N, R) RxWaitForStableCondition(&(N)->Condition, &(N)->TransitionWaitList, (R), NULL)
474c2c66affSColin Finck #define RxTransitionNetRoot(N, C) RxUpdateCondition((C), &(N)->Condition, &(N)->TransitionWaitList)
475c2c66affSColin Finck 
476c2c66affSColin Finck BOOLEAN
477c2c66affSColin Finck RxFinalizeNetRoot(
478c2c66affSColin Finck     _Out_ PNET_ROOT ThisNetRoot,
479c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
480c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
481c2c66affSColin Finck 
482c2c66affSColin Finck NTSTATUS
483c2c66affSColin Finck RxInitializeVNetRootParameters(
484c2c66affSColin Finck    _In_ PRX_CONTEXT RxContext,
485c2c66affSColin Finck    _Out_ LUID *LogonId,
486c2c66affSColin Finck    _Out_ PULONG SessionId,
487c2c66affSColin Finck    _Out_ PUNICODE_STRING *UserNamePtr,
488c2c66affSColin Finck    _Out_ PUNICODE_STRING *UserDomainNamePtr,
489c2c66affSColin Finck    _Out_ PUNICODE_STRING *PasswordPtr,
490c2c66affSColin Finck    _Out_ PULONG Flags);
491c2c66affSColin Finck 
492c2c66affSColin Finck VOID
493c2c66affSColin Finck RxUninitializeVNetRootParameters(
494c2c66affSColin Finck    _In_ PUNICODE_STRING UserName,
495c2c66affSColin Finck    _In_ PUNICODE_STRING UserDomainName,
496c2c66affSColin Finck    _In_ PUNICODE_STRING Password,
497c2c66affSColin Finck    _Out_ PULONG Flags);
498c2c66affSColin Finck 
499c2c66affSColin Finck PV_NET_ROOT
500c2c66affSColin Finck RxCreateVNetRoot(
501c2c66affSColin Finck     _In_ PRX_CONTEXT RxContext,
502c2c66affSColin Finck     _In_ PNET_ROOT NetRoot,
503c2c66affSColin Finck     _In_ PUNICODE_STRING CanonicalName,
504c2c66affSColin Finck     _In_ PUNICODE_STRING LocalNetRootName,
505c2c66affSColin Finck     _In_ PUNICODE_STRING FilePath,
506c2c66affSColin Finck     _In_ PRX_CONNECTION_ID RxConnectionId);
507c2c66affSColin Finck 
508c2c66affSColin Finck BOOLEAN
509c2c66affSColin Finck RxFinalizeVNetRoot(
510c2c66affSColin Finck     _Out_ PV_NET_ROOT ThisVNetRoot,
511c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
512c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
513c2c66affSColin Finck 
514c2c66affSColin Finck #define RxWaitForStableVNetRoot(V, R) RxWaitForStableCondition(&(V)->Condition, &(V)->TransitionWaitList, (R), NULL)
515c2c66affSColin Finck #define RxTransitionVNetRoot(V, C) RxUpdateCondition((C), &(V)->Condition, &(V)->TransitionWaitList)
516c2c66affSColin Finck 
517c2c66affSColin Finck VOID
518c2c66affSColin Finck RxSetFileSizeWithLock(
519c2c66affSColin Finck     _Inout_ PFCB Fcb,
520c2c66affSColin Finck     _In_ PLONGLONG FileSize);
521c2c66affSColin Finck 
522c2c66affSColin Finck VOID
523c2c66affSColin Finck RxGetFileSizeWithLock(
524c2c66affSColin Finck     _In_ PFCB Fcb,
525c2c66affSColin Finck     _Out_ PLONGLONG FileSize);
526c2c66affSColin Finck 
527c2c66affSColin Finck #if (_WIN32_WINNT >= 0x0600)
528*420c0360SDenis Malikov PFCB
529c2c66affSColin Finck RxCreateNetFcb(
530c2c66affSColin Finck     _In_ PRX_CONTEXT RxContext,
531c2c66affSColin Finck     _In_ PIRP Irp,
532c2c66affSColin Finck     _In_ PV_NET_ROOT VNetRoot,
533c2c66affSColin Finck     _In_ PUNICODE_STRING Name);
534c2c66affSColin Finck #else
535c2c66affSColin Finck PFCB
536c2c66affSColin Finck RxCreateNetFcb(
537c2c66affSColin Finck     _In_ PRX_CONTEXT RxContext,
538c2c66affSColin Finck     _In_ PV_NET_ROOT VNetRoot,
539c2c66affSColin Finck     _In_ PUNICODE_STRING Name);
540c2c66affSColin Finck #endif
541c2c66affSColin Finck 
542c2c66affSColin Finck #define RxWaitForStableNetFcb(F, R) RxWaitForStableCondition(&(F)->Condition, &(F)->NonPaged->TransitionWaitList, (R), NULL )
543c2c66affSColin Finck #define RxTransitionNetFcb(F, C) RxUpdateCondition((C), &(F)->Condition, &(F)->NonPaged->TransitionWaitList)
544c2c66affSColin Finck 
545c2c66affSColin Finck #define RxFormInitPacket(IP, I1, I1a, I2, I3, I4a, I4b, I5, I6, I7) ( \
546c2c66affSColin Finck     IP.pAttributes = I1, IP.pNumLinks = I1a,                          \
547c2c66affSColin Finck     IP.pCreationTime = I2, IP.pLastAccessTime = I3,                   \
548c2c66affSColin Finck     IP.pLastWriteTime = I4a, IP.pLastChangeTime = I4b,                \
549c2c66affSColin Finck     IP.pAllocationSize = I5, IP.pFileSize = I6,                       \
550c2c66affSColin Finck     IP.pValidDataLength = I7, &IP)
551c2c66affSColin Finck 
552c2c66affSColin Finck #if DBG
553c2c66affSColin Finck #define ASSERT_CORRECT_FCB_STRUCTURE_DBG_ONLY(Fcb) \
554c2c66affSColin Finck {                                                  \
555c2c66affSColin Finck     ASSERT(Fcb->NonPaged == Fcb->CopyOfNonPaged);  \
556c2c66affSColin Finck     ASSERT(Fcb->NonPaged->FcbBackPointer == Fcb);  \
557c2c66affSColin Finck }
558c2c66affSColin Finck #else
559c2c66affSColin Finck #define ASSERT_CORRECT_FCB_STRUCTURE_DBG_ONLY(Fcb)
560c2c66affSColin Finck #endif
561c2c66affSColin Finck 
562c2c66affSColin Finck #define ASSERT_CORRECT_FCB_STRUCTURE(Fcb)                      \
563c2c66affSColin Finck {                                                              \
564c2c66affSColin Finck     ASSERT(NodeTypeIsFcb(Fcb));                                \
565c2c66affSColin Finck     ASSERT(Fcb->NonPaged != NULL );                            \
566c2c66affSColin Finck     ASSERT(NodeType(Fcb->NonPaged) == RDBSS_NTC_NONPAGED_FCB); \
567c2c66affSColin Finck     ASSERT_CORRECT_FCB_STRUCTURE_DBG_ONLY(Fcb);                \
568c2c66affSColin Finck }
569c2c66affSColin Finck 
570c2c66affSColin Finck VOID
571c2c66affSColin Finck NTAPI
572c2c66affSColin Finck RxFinishFcbInitialization(
573c2c66affSColin Finck     _In_ OUT PMRX_FCB Fcb,
574c2c66affSColin Finck     _In_ RX_FILE_TYPE FileType,
575c2c66affSColin Finck     _In_opt_ PFCB_INIT_PACKET InitPacket);
576c2c66affSColin Finck 
577c2c66affSColin Finck #define RxWaitForStableSrvOpen(S, R) RxWaitForStableCondition(&(S)->Condition, &(S)->TransitionWaitList, (R), NULL)
578c2c66affSColin Finck #define RxTransitionSrvOpen(S, C) RxUpdateCondition((C), &(S)->Condition, &(S)->TransitionWaitList)
579c2c66affSColin Finck 
580c2c66affSColin Finck VOID
581c2c66affSColin Finck RxRemoveNameNetFcb(
582c2c66affSColin Finck     _Out_ PFCB ThisFcb);
583c2c66affSColin Finck 
584c2c66affSColin Finck LONG
585c2c66affSColin Finck RxpReferenceNetFcb(
586c2c66affSColin Finck    _In_ PFCB Fcb);
587c2c66affSColin Finck 
588c2c66affSColin Finck LONG
589c2c66affSColin Finck RxpDereferenceNetFcb(
590c2c66affSColin Finck    _In_ PFCB Fcb);
591c2c66affSColin Finck 
592c2c66affSColin Finck BOOLEAN
593c2c66affSColin Finck RxpDereferenceAndFinalizeNetFcb(
594c2c66affSColin Finck     _Out_ PFCB ThisFcb,
595c2c66affSColin Finck     _In_ PRX_CONTEXT RxContext,
596c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
597c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
598c2c66affSColin Finck 
599c2c66affSColin Finck PSRV_OPEN
600c2c66affSColin Finck RxCreateSrvOpen(
601c2c66affSColin Finck     _In_ PV_NET_ROOT VNetRoot,
602c2c66affSColin Finck     _In_ OUT PFCB Fcb);
603c2c66affSColin Finck 
604c2c66affSColin Finck BOOLEAN
605c2c66affSColin Finck RxFinalizeSrvOpen(
606c2c66affSColin Finck     _Out_ PSRV_OPEN ThisSrvOpen,
607c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
608c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
609c2c66affSColin Finck 
610c2c66affSColin Finck FORCEINLINE
611c2c66affSColin Finck PUNICODE_STRING
GET_ALREADY_PREFIXED_NAME(PMRX_SRV_OPEN SrvOpen,PMRX_FCB Fcb)612c2c66affSColin Finck GET_ALREADY_PREFIXED_NAME(
613c2c66affSColin Finck     PMRX_SRV_OPEN SrvOpen,
614c2c66affSColin Finck     PMRX_FCB Fcb)
615c2c66affSColin Finck {
616c2c66affSColin Finck     PFCB ThisFcb = (PFCB)Fcb;
617c2c66affSColin Finck 
618c2c66affSColin Finck #if DBG
619c2c66affSColin Finck     if (SrvOpen != NULL)
620c2c66affSColin Finck     {
621c2c66affSColin Finck         ASSERT(NodeType(SrvOpen) == RDBSS_NTC_SRVOPEN);
622c2c66affSColin Finck         ASSERT(ThisFcb != NULL);
623c2c66affSColin Finck         ASSERT(NodeTypeIsFcb(Fcb));
624c2c66affSColin Finck         ASSERT(SrvOpen->pFcb == Fcb);
625c2c66affSColin Finck         ASSERT(SrvOpen->pAlreadyPrefixedName == &ThisFcb->PrivateAlreadyPrefixedName);
626c2c66affSColin Finck     }
627c2c66affSColin Finck #endif
628c2c66affSColin Finck 
629c2c66affSColin Finck     return &ThisFcb->PrivateAlreadyPrefixedName;
630c2c66affSColin Finck }
631c2c66affSColin Finck #define GET_ALREADY_PREFIXED_NAME_FROM_CONTEXT(Rxcontext) GET_ALREADY_PREFIXED_NAME((Rxcontext)->pRelevantSrvOpen, (Rxcontext)->pFcb)
632c2c66affSColin Finck 
633c2c66affSColin Finck PMRX_FOBX
634c2c66affSColin Finck NTAPI
635c2c66affSColin Finck RxCreateNetFobx(
636c2c66affSColin Finck     _Out_ PRX_CONTEXT RxContext,
637c2c66affSColin Finck     _In_ PMRX_SRV_OPEN MrxSrvOpen);
638c2c66affSColin Finck 
639c2c66affSColin Finck BOOLEAN
640c2c66affSColin Finck RxFinalizeNetFobx(
641c2c66affSColin Finck     _Out_ PFOBX ThisFobx,
642c2c66affSColin Finck     _In_ BOOLEAN RecursiveFinalize,
643c2c66affSColin Finck     _In_ BOOLEAN ForceFinalize);
644c2c66affSColin Finck 
645c2c66affSColin Finck #ifdef __REACTOS__
646c2c66affSColin Finck #define FILL_IN_FCB(Fcb, a, nl, ct, lat, lwt, lct, as, fs, vdl)  \
647c2c66affSColin Finck     (Fcb)->Attributes = a;                                       \
648c2c66affSColin Finck     (Fcb)->NumberOfLinks = nl;                                   \
649c2c66affSColin Finck     (Fcb)->CreationTime.QuadPart = ct;                           \
650c2c66affSColin Finck     (Fcb)->LastAccessTime.QuadPart = lat;                        \
651c2c66affSColin Finck     (Fcb)->LastWriteTime.QuadPart = lwt;                         \
652c2c66affSColin Finck     (Fcb)->LastChangeTime.QuadPart = lct;                        \
653c2c66affSColin Finck     (Fcb)->ActualAllocationLength = as;                          \
654c2c66affSColin Finck     (Fcb)->Header.AllocationSize.QuadPart = as;                  \
655c2c66affSColin Finck     (Fcb)->Header.FileSize.QuadPart = fs;                        \
656c2c66affSColin Finck     (Fcb)->Header.ValidDataLength.QuadPart = vdl;                \
657c2c66affSColin Finck     SetFlag((Fcb)->FcbState, FCB_STATE_TIME_AND_SIZE_ALREADY_SET)
658c2c66affSColin Finck 
659c2c66affSColin Finck #define TRACKER_ACQUIRE_FCB 0x61616161
660c2c66affSColin Finck #define TRACKER_RELEASE_FCB_NO_BUFF_PENDING 0x72727272
661c2c66affSColin Finck #define TRACKER_RELEASE_NON_EXCL_FCB_BUFF_PENDING 0x72727230
662c2c66affSColin Finck #define TRACKER_RELEASE_EXCL_FCB_BUFF_PENDING 0x72727231
663c2c66affSColin Finck #define TRACKER_RELEASE_FCB_FOR_THRD_NO_BUFF_PENDING 0x72727474
664c2c66affSColin Finck #define TRACKER_RELEASE_NON_EXCL_FCB_FOR_THRD_BUFF_PENDING 0x72727430
665c2c66affSColin Finck #define TRACKER_RELEASE_EXCL_FCB_FOR_THRD_BUFF_PENDING 0x72727431
666c2c66affSColin Finck #define TRACKER_FCB_FREE 0x72724372
667c2c66affSColin Finck 
668c2c66affSColin Finck #define FCB_STATE_BUFFERING_STATE_WITH_NO_SHARES \
669c2c66affSColin Finck     (( FCB_STATE_WRITECACHING_ENABLED            \
670c2c66affSColin Finck     | FCB_STATE_WRITEBUFFERING_ENABLED           \
671c2c66affSColin Finck     | FCB_STATE_READCACHING_ENABLED              \
672c2c66affSColin Finck     | FCB_STATE_READBUFFERING_ENABLED            \
673c2c66affSColin Finck     | FCB_STATE_LOCK_BUFFERING_ENABLED           \
674c2c66affSColin Finck     | FCB_STATE_FILESIZECACHEING_ENABLED         \
675c2c66affSColin Finck     | FCB_STATE_FILETIMECACHEING_ENABLED))
676c2c66affSColin Finck 
677c2c66affSColin Finck #endif
678c2c66affSColin Finck 
679c2c66affSColin Finck #endif
680