[FASTFAT] Start implementing FAT32 statistics support
[reactos.git] / drivers / filesystems / npfs / npfs.h
1 /*
2 * PROJECT: ReactOS Named Pipe FileSystem
3 * LICENSE: BSD - See COPYING.ARM in the top level directory
4 * FILE: drivers/filesystems/npfs/npfs.h
5 * PURPOSE: Named Pipe FileSystem Header
6 * PROGRAMMERS: ReactOS Portable Systems Group
7 */
8
9 #ifndef _NPFS_PCH_
10 #define _NPFS_PCH_
11
12 /* INCLUDES *******************************************************************/
13
14 /* System Headers */
15 #include <ntifs.h>
16 #include <ndk/obfuncs.h>
17 #include <pseh/pseh2.h>
18 //#define UNIMPLEMENTED
19 //#define DPRINT1 DbgPrint
20
21 #define NDEBUG
22 #include <debug.h>
23 #define TRACE(...) /* DPRINT1("%s: ", __FUNCTION__); DbgPrint(__VA_ARGS__) */
24
25 /* Allow Microsoft Extensions */
26 #ifdef _MSC_VER
27 #pragma warning(disable:4201)
28 #pragma warning(disable:4214)
29 #pragma warning(disable:4100)
30 #endif
31
32 #define MIN_INDEXED_LENGTH 5
33 #define MAX_INDEXED_LENGTH 9
34
35 /* TYPEDEFS & DEFINES *********************************************************/
36
37 //
38 // Pool Tags for NPFS (from pooltag.txt)
39 //
40 // Npf* -npfs.sys - Npfs Allocations
41 // NpFc - npfs.sys - CCB, client control block
42 // NpFf - npfs.sys - FCB, file control block
43 // NpFC - npfs.sys - ROOT_DCB CCB
44 // NpFD - npfs.sys - DCB, directory block
45 // NpFg - npfs.sys - Global storage
46 // NpFi - npfs.sys - NPFS client info buffer.
47 // NpFn - npfs.sys - Name block
48 // NpFq - npfs.sys - Query template buffer used for directory query
49 // NpFr - npfs.sys - DATA_ENTRY records(read / write buffers)
50 // NpFs - npfs.sys - Client security context
51 // NpFw - npfs.sys - Write block
52 // NpFW - npfs.sys - Write block
53 #define NPFS_CCB_TAG 'cFpN'
54 #define NPFS_ROOT_DCB_CCB_TAG 'CFpN'
55 #define NPFS_DCB_TAG 'DFpN'
56 #define NPFS_FCB_TAG 'fFpN'
57 #define NPFS_GLOBAL_TAG 'gFpN'
58 #define NPFS_CLIENT_INFO_TAG 'iFpN'
59 #define NPFS_NAME_BLOCK_TAG 'nFpN'
60 #define NPFS_QUERY_TEMPLATE_TAG 'qFpN'
61 #define NPFS_DATA_ENTRY_TAG 'rFpN'
62 #define NPFS_CLIENT_SEC_CTX_TAG 'sFpN'
63 #define NPFS_WAIT_BLOCK_TAG 'tFpN'
64 #define NPFS_WRITE_BLOCK_TAG 'wFpN'
65
66 //
67 // NPFS bugchecking support
68 //
69 // We define the NpBugCheck macro which triggers a NPFS_FILE_SYSTEM bugcheck
70 // containing the source file ID number and the line where it was emitted, as
71 // described in the MSDN article "Bug Check 0x25: NPFS_FILE_SYSTEM".
72 //
73 // The bugcheck emits 4 ULONGs; the first one is made, in its high word, by
74 // the current source file ID and in its low word, by the line number; the
75 // three other ones are user-defined.
76 //
77 // In order to avoid redefinition of the same file ID in different source files,
78 // we gather all of them here, so that you will have to add (or remove) a new
79 // one as soon as you add (or remove) a source file from the NPFS driver code.
80 //
81 // To use the NpBugCheck macro in a source file, define at its beginning
82 // the constant NPFS_BUGCHECK_FILE_ID with one of the following file IDs,
83 // then use the bugcheck macro wherever you want.
84 //
85 #define NPFS_BUGCHECK_CLEANUP 0x0001
86 #define NPFS_BUGCHECK_CLOSE 0x0002
87 #define NPFS_BUGCHECK_CREATE 0x0003
88 #define NPFS_BUGCHECK_DATASUP 0x0004
89 #define NPFS_BUGCHECK_FILEINFO 0x0005
90 #define NPFS_BUGCHECK_FILEOBSUP 0x0006
91 #define NPFS_BUGCHECK_FLUSHBUF 0x0007
92 #define NPFS_BUGCHECK_FSCTRL 0x0008
93 #define NPFS_BUGCHECK_MAIN 0x0009
94 #define NPFS_BUGCHECK_PREFXSUP 0x000a
95 #define NPFS_BUGCHECK_READ 0x000b
96 #define NPFS_BUGCHECK_READSUP 0x000c
97 #define NPFS_BUGCHECK_SECURSUP 0x000d
98 #define NPFS_BUGCHECK_SEINFO 0x000e
99 #define NPFS_BUGCHECK_STATESUP 0x000f
100 #define NPFS_BUGCHECK_STRUCSUP 0x0010
101 #define NPFS_BUGCHECK_VOLINFO 0x0011
102 #define NPFS_BUGCHECK_WAITSUP 0x0012
103 #define NPFS_BUGCHECK_WRITE 0x0013
104 #define NPFS_BUGCHECK_WRITESUP 0x0014
105
106 #define NpBugCheck(p1, p2, p3) \
107 KeBugCheckEx(NPFS_FILE_SYSTEM, \
108 (NPFS_BUGCHECK_FILE_ID << 16) | __LINE__, \
109 (p1), (p2), (p3))
110
111 /* Node Type Codes for NPFS */
112 #define NPFS_NTC_VCB 1
113 #define NPFS_NTC_ROOT_DCB 2
114 #define NPFS_NTC_FCB 4
115 #define NPFS_NTC_CCB 6
116 #define NPFS_NTC_NONPAGED_CCB 7
117 #define NPFS_NTC_ROOT_DCB_CCB 8
118 typedef USHORT NODE_TYPE_CODE, *PNODE_TYPE_CODE;
119
120 /* Data Queue States */
121 typedef enum _NP_DATA_QUEUE_STATE
122 {
123 ReadEntries = 0,
124 WriteEntries = 1,
125 Empty = 2
126 } NP_DATA_QUEUE_STATE;
127
128 /* Data Queue Entry Types */
129 typedef enum _NP_DATA_QUEUE_ENTRY_TYPE
130 {
131 Buffered = 0,
132 Unbuffered
133 } NP_DATA_QUEUE_ENTRY_TYPE;
134
135 /* An Input or Output Data Queue. Each CCB has two of these. */
136 typedef struct _NP_DATA_QUEUE
137 {
138 LIST_ENTRY Queue;
139 ULONG QueueState;
140 ULONG BytesInQueue;
141 ULONG EntriesInQueue;
142 ULONG QuotaUsed;
143 ULONG ByteOffset;
144 ULONG Quota;
145 } NP_DATA_QUEUE, *PNP_DATA_QUEUE;
146
147 /* The Entries that go into the Queue */
148 typedef struct _NP_DATA_QUEUE_ENTRY
149 {
150 LIST_ENTRY QueueEntry;
151 ULONG DataEntryType;
152 PIRP Irp;
153 ULONG QuotaInEntry;
154 PSECURITY_CLIENT_CONTEXT ClientSecurityContext;
155 ULONG DataSize;
156 } NP_DATA_QUEUE_ENTRY, *PNP_DATA_QUEUE_ENTRY;
157
158 /* A Wait Queue. Only the VCB has one of these. */
159 typedef struct _NP_WAIT_QUEUE
160 {
161 LIST_ENTRY WaitList;
162 KSPIN_LOCK WaitLock;
163 } NP_WAIT_QUEUE, *PNP_WAIT_QUEUE;
164
165 /* The Entries in the Queue above, one for each Waiter. */
166 typedef struct _NP_WAIT_QUEUE_ENTRY
167 {
168 PIRP Irp;
169 KDPC Dpc;
170 KTIMER Timer;
171 PNP_WAIT_QUEUE WaitQueue;
172 UNICODE_STRING AliasName;
173 PFILE_OBJECT FileObject;
174 } NP_WAIT_QUEUE_ENTRY, *PNP_WAIT_QUEUE_ENTRY;
175
176 /* The event buffer in the NonPaged CCB */
177 typedef struct _NP_EVENT_BUFFER
178 {
179 PKEVENT Event;
180 } NP_EVENT_BUFFER, *PNP_EVENT_BUFFER;
181
182 /* The CCB for the Root DCB */
183 typedef struct _NP_ROOT_DCB_CCB
184 {
185 NODE_TYPE_CODE NodeType;
186 PVOID Unknown;
187 ULONG Unknown2;
188 } NP_ROOT_DCB_CCB, *PNP_ROOT_DCB_FCB;
189
190 /* The header that both FCB and DCB share */
191 typedef struct _NP_CB_HEADER
192 {
193 NODE_TYPE_CODE NodeType;
194 LIST_ENTRY DcbEntry;
195 PVOID ParentDcb;
196 ULONG CurrentInstances;
197 ULONG ServerOpenCount;
198 PSECURITY_DESCRIPTOR SecurityDescriptor;
199 } NP_CB_HEADER, *PNP_CB_HEADER;
200
201 /* The footer that both FCB and DCB share */
202 typedef struct _NP_CB_FOOTER
203 {
204 UNICODE_STRING FullName;
205 UNICODE_STRING ShortName;
206 UNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry;
207 } NP_CB_FOOTER;
208
209 /* A Directory Control Block (DCB) */
210 typedef struct _NP_DCB
211 {
212 /* Common Header */
213 NP_CB_HEADER;
214
215 /* DCB-specific data */
216 LIST_ENTRY NotifyList;
217 LIST_ENTRY NotifyList2;
218 LIST_ENTRY FcbList;
219 #ifndef _WIN64
220 ULONG Pad;
221 #endif
222
223 /* Common Footer */
224 NP_CB_FOOTER;
225 } NP_DCB, *PNP_DCB;
226
227 /* A File Control BLock (FCB) */
228 typedef struct _NP_FCB
229 {
230 /* Common Header */
231 NP_CB_HEADER;
232
233 /* FCB-specific fields */
234 ULONG MaximumInstances;
235 USHORT NamedPipeConfiguration;
236 USHORT NamedPipeType;
237 LARGE_INTEGER Timeout;
238 LIST_ENTRY CcbList;
239 #ifdef _WIN64
240 PVOID Pad[2];
241 #endif
242
243 /* Common Footer */
244 NP_CB_FOOTER;
245 } NP_FCB, *PNP_FCB;
246
247 C_ASSERT(FIELD_OFFSET(NP_FCB, PrefixTableEntry) == FIELD_OFFSET(NP_DCB, PrefixTableEntry));
248
249 /* The nonpaged portion of the CCB */
250 typedef struct _NP_NONPAGED_CCB
251 {
252 NODE_TYPE_CODE NodeType;
253 PNP_EVENT_BUFFER EventBuffer[2];
254 ERESOURCE Lock;
255 } NP_NONPAGED_CCB, *PNP_NONPAGED_CCB;
256
257 /* A Client Control Block (CCB) */
258 typedef struct _NP_CCB
259 {
260 NODE_TYPE_CODE NodeType;
261 UCHAR NamedPipeState;
262 UCHAR ReadMode[2];
263 UCHAR CompletionMode[2];
264 SECURITY_QUALITY_OF_SERVICE ClientQos;
265 LIST_ENTRY CcbEntry;
266 PNP_FCB Fcb;
267 PFILE_OBJECT FileObject[2];
268 PEPROCESS Process;
269 PVOID ClientSession;
270 PNP_NONPAGED_CCB NonPagedCcb;
271 NP_DATA_QUEUE DataQueue[2];
272 PSECURITY_CLIENT_CONTEXT ClientContext;
273 LIST_ENTRY IrpList;
274 } NP_CCB, *PNP_CCB;
275
276 /* A Volume Control Block (VCB) */
277 typedef struct _NP_VCB
278 {
279 NODE_TYPE_CODE NodeType;
280 ULONG ReferenceCount;
281 PNP_DCB RootDcb;
282 UNICODE_PREFIX_TABLE PrefixTable;
283 ERESOURCE Lock;
284 RTL_GENERIC_TABLE EventTable;
285 NP_WAIT_QUEUE WaitQueue;
286 } NP_VCB, *PNP_VCB;
287
288 extern PNP_VCB NpVcb;
289
290 /* Defines an alias */
291 typedef struct _NPFS_ALIAS
292 {
293 struct _NPFS_ALIAS *Next;
294 PUNICODE_STRING TargetName;
295 UNICODE_STRING Name;
296 } NPFS_ALIAS, *PNPFS_ALIAS;
297
298 /* Private structure used to enumerate the alias values */
299 typedef struct _NPFS_QUERY_VALUE_CONTEXT
300 {
301 BOOLEAN SizeOnly;
302 SIZE_T FullSize;
303 ULONG NumberOfAliases;
304 ULONG NumberOfEntries;
305 PNPFS_ALIAS CurrentAlias;
306 PUNICODE_STRING CurrentTargetName;
307 PWCHAR CurrentStringPointer;
308 } NPFS_QUERY_VALUE_CONTEXT, *PNPFS_QUERY_VALUE_CONTEXT;
309
310 extern PNPFS_ALIAS NpAliasList;
311 extern PNPFS_ALIAS NpAliasListByLength[MAX_INDEXED_LENGTH + 1 - MIN_INDEXED_LENGTH];
312
313 /* This structure is actually a user-mode structure and should go into a share header */
314 typedef struct _NP_CLIENT_PROCESS
315 {
316 PVOID Unknown;
317 PVOID Process;
318 USHORT DataLength;
319 WCHAR Buffer[17];
320 } NP_CLIENT_PROCESS, *PNP_CLIENT_PROCESS;
321
322 /* FUNCTIONS ******************************************************************/
323
324 /* Functions to lock/unlock the global VCB lock */
325
326 FORCEINLINE
327 VOID
328 NpAcquireSharedVcb(VOID)
329 {
330 /* Acquire the lock in shared mode */
331 ExAcquireResourceSharedLite(&NpVcb->Lock, TRUE);
332 }
333
334 FORCEINLINE
335 VOID
336 NpAcquireExclusiveVcb(VOID)
337 {
338 /* Acquire the lock in exclusive mode */
339 ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
340 }
341
342 FORCEINLINE
343 VOID
344 NpReleaseVcb(VOID)
345 {
346 /* Release the lock */
347 ExReleaseResourceLite(&NpVcb->Lock);
348 }
349
350 //
351 // Function to process deferred IRPs outside the VCB lock but still within the
352 // critical region
353 //
354 FORCEINLINE
355 VOID
356 NpCompleteDeferredIrps(IN PLIST_ENTRY DeferredList)
357 {
358 PLIST_ENTRY ThisEntry, NextEntry;
359 PIRP Irp;
360
361 /* Loop the list */
362 ThisEntry = DeferredList->Flink;
363 while (ThisEntry != DeferredList)
364 {
365 /* Remember the next entry, but don't switch to it yet */
366 NextEntry = ThisEntry->Flink;
367
368 /* Complete the IRP for this entry */
369 Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
370 IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);
371
372 /* And now switch to the next one */
373 ThisEntry = NextEntry;
374 }
375 }
376
377 LONG
378 NTAPI
379 NpCompareAliasNames(
380 _In_ PCUNICODE_STRING String1,
381 _In_ PCUNICODE_STRING String2);
382
383 BOOLEAN
384 NTAPI
385 NpDeleteEventTableEntry(IN PRTL_GENERIC_TABLE Table,
386 IN PVOID Buffer);
387
388 VOID
389 NTAPI
390 NpInitializeWaitQueue(IN PNP_WAIT_QUEUE WaitQueue);
391
392 NTSTATUS
393 NTAPI
394 NpUninitializeDataQueue(IN PNP_DATA_QUEUE DataQueue);
395
396 PLIST_ENTRY
397 NTAPI
398 NpGetNextRealDataQueueEntry(IN PNP_DATA_QUEUE DataQueue,
399 IN PLIST_ENTRY List);
400
401 PIRP
402 NTAPI
403 NpRemoveDataQueueEntry(IN PNP_DATA_QUEUE DataQueue,
404 IN BOOLEAN Flag,
405 IN PLIST_ENTRY List);
406
407 NTSTATUS
408 NTAPI
409 NpAddDataQueueEntry(IN ULONG NamedPipeEnd,
410 IN PNP_CCB Ccb,
411 IN PNP_DATA_QUEUE DataQueue,
412 IN ULONG Who,
413 IN ULONG Type,
414 IN ULONG DataSize,
415 IN PIRP Irp,
416 IN PVOID Buffer,
417 IN ULONG ByteOffset);
418
419 VOID
420 NTAPI
421 NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue,
422 IN PLIST_ENTRY List);
423
424 NTSTATUS
425 NTAPI
426 NpInitializeDataQueue(IN PNP_DATA_QUEUE DataQueue,
427 IN ULONG Quota);
428
429 NTSTATUS
430 NTAPI
431 NpCreateCcb(IN PNP_FCB Fcb,
432 IN PFILE_OBJECT FileObject,
433 IN UCHAR State,
434 IN UCHAR ReadMode,
435 IN UCHAR CompletionMode,
436 IN ULONG InQuota,
437 IN ULONG OutQuota,
438 OUT PNP_CCB *NewCcb);
439
440 NTSTATUS
441 NTAPI
442 NpCreateFcb(IN PNP_DCB Dcb,
443 IN PUNICODE_STRING PipeName,
444 IN ULONG MaximumInstances,
445 IN LARGE_INTEGER Timeout,
446 IN USHORT NamedPipeConfiguration,
447 IN USHORT NamedPipeType,
448 OUT PNP_FCB *NewFcb);
449
450 NTSTATUS
451 NTAPI
452 NpCreateRootDcb(VOID);
453
454 NTSTATUS
455 NTAPI
456 NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb);
457
458 VOID
459 NTAPI
460 NpInitializeVcb(VOID);
461
462 VOID
463 NTAPI
464 NpDeleteCcb(IN PNP_CCB Ccb,
465 IN PLIST_ENTRY ListEntry);
466
467 VOID
468 NTAPI
469 NpDeleteFcb(IN PNP_FCB Fcb,
470 IN PLIST_ENTRY ListEntry);
471
472 NTSTATUS
473 NTAPI
474 NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
475 IN PIRP Irp);
476
477 NTSTATUS
478 NTAPI
479 NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
480 IN PIRP Irp);
481
482 NTSTATUS
483 NTAPI
484 NpFsdClose(IN PDEVICE_OBJECT DeviceObject,
485 IN PIRP Irp);
486
487 NTSTATUS
488 NTAPI
489 NpFsdCleanup(IN PDEVICE_OBJECT DeviceObject,
490 IN PIRP Irp);
491
492 NTSTATUS
493 NTAPI
494 NpFsdFileSystemControl(IN PDEVICE_OBJECT DeviceObject,
495 IN PIRP Irp);
496
497 NTSTATUS
498 NTAPI
499 NpSetConnectedPipeState(IN PNP_CCB Ccb,
500 IN PFILE_OBJECT FileObject,
501 IN PLIST_ENTRY List);
502
503 NTSTATUS
504 NTAPI
505 NpSetListeningPipeState(IN PNP_CCB Ccb,
506 IN PIRP Irp,
507 IN PLIST_ENTRY List);
508
509 NTSTATUS
510 NTAPI
511 NpSetDisconnectedPipeState(IN PNP_CCB Ccb,
512 IN PLIST_ENTRY List);
513
514 NTSTATUS
515 NTAPI
516 NpSetClosingPipeState(IN PNP_CCB Ccb,
517 IN PIRP Irp,
518 IN ULONG NamedPipeEnd,
519 IN PLIST_ENTRY List);
520
521 VOID
522 NTAPI
523 NpFreeClientSecurityContext(IN PSECURITY_CLIENT_CONTEXT ClientContext);
524
525 NTSTATUS
526 NTAPI
527 NpImpersonateClientContext(IN PNP_CCB Ccb);
528
529 VOID
530 NTAPI
531 NpCopyClientContext(IN PNP_CCB Ccb,
532 IN PNP_DATA_QUEUE_ENTRY DataQueueEntry);
533
534 VOID
535 NTAPI
536 NpUninitializeSecurity(IN PNP_CCB Ccb);
537
538 NTSTATUS
539 NTAPI
540 NpInitializeSecurity(IN PNP_CCB Ccb,
541 IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
542 IN PETHREAD Thread);
543
544 NTSTATUS
545 NTAPI
546 NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
547 IN PNP_CCB Ccb,
548 IN PETHREAD Thread,
549 IN PSECURITY_CLIENT_CONTEXT *Context);
550
551 VOID
552 NTAPI
553 NpSetFileObject(IN PFILE_OBJECT FileObject,
554 IN PVOID PrimaryContext,
555 IN PVOID Ccb,
556 IN ULONG NamedPipeEnd);
557
558 NODE_TYPE_CODE
559 NTAPI
560 NpDecodeFileObject(IN PFILE_OBJECT FileObject,
561 OUT PVOID *PrimaryContext OPTIONAL,
562 OUT PNP_CCB *Ccb,
563 OUT PULONG NamedPipeEnd OPTIONAL);
564
565 PNP_FCB
566 NTAPI
567 NpFindPrefix(IN PUNICODE_STRING Name,
568 IN ULONG CaseInsensitiveIndex,
569 IN PUNICODE_STRING Prefix);
570
571 NTSTATUS
572 NTAPI
573 NpFindRelativePrefix(IN PNP_DCB Dcb,
574 IN PUNICODE_STRING Name,
575 IN ULONG CaseInsensitiveIndex,
576 IN PUNICODE_STRING Prefix,
577 OUT PNP_FCB *FoundFcb);
578
579 VOID
580 NTAPI
581 NpCheckForNotify(IN PNP_DCB Dcb,
582 IN BOOLEAN SecondList,
583 IN PLIST_ENTRY List);
584
585 NTSTATUS
586 NTAPI
587 NpAddWaiter(IN PNP_WAIT_QUEUE WaitQueue,
588 IN LARGE_INTEGER WaitTime,
589 IN PIRP Irp,
590 IN PUNICODE_STRING AliasName);
591
592 NTSTATUS
593 NTAPI
594 NpCancelWaiter(IN PNP_WAIT_QUEUE WaitQueue,
595 IN PUNICODE_STRING PipeName,
596 IN NTSTATUS Status,
597 IN PLIST_ENTRY ListEntry);
598
599
600 IO_STATUS_BLOCK
601 NTAPI
602 NpReadDataQueue(IN PNP_DATA_QUEUE DataQueue,
603 IN BOOLEAN Peek,
604 IN BOOLEAN ReadOverflowOperation,
605 IN PVOID Buffer,
606 IN ULONG BufferSize,
607 IN ULONG Mode,
608 IN PNP_CCB Ccb,
609 IN PLIST_ENTRY List);
610
611
612 NTSTATUS
613 NTAPI
614 NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
615 IN ULONG Mode,
616 IN PVOID OutBuffer,
617 IN ULONG OutBufferSize,
618 IN ULONG PipeType,
619 OUT PULONG BytesWritten,
620 IN PNP_CCB Ccb,
621 IN ULONG NamedPipeEnd,
622 IN PETHREAD Thread,
623 IN PLIST_ENTRY List);
624
625 NTSTATUS
626 NTAPI
627 NpFsdRead(IN PDEVICE_OBJECT DeviceObject,
628 IN PIRP Irp);
629
630 _Function_class_(FAST_IO_READ)
631 _IRQL_requires_same_
632 BOOLEAN
633 NTAPI
634 NpFastRead(
635 _In_ PFILE_OBJECT FileObject,
636 _In_ PLARGE_INTEGER FileOffset,
637 _In_ ULONG Length,
638 _In_ BOOLEAN Wait,
639 _In_ ULONG LockKey,
640 _Out_ PVOID Buffer,
641 _Out_ PIO_STATUS_BLOCK IoStatus,
642 _In_ PDEVICE_OBJECT DeviceObject);
643
644 _Function_class_(FAST_IO_WRITE)
645 _IRQL_requires_same_
646 BOOLEAN
647 NTAPI
648 NpFastWrite(
649 _In_ PFILE_OBJECT FileObject,
650 _In_ PLARGE_INTEGER FileOffset,
651 _In_ ULONG Length,
652 _In_ BOOLEAN Wait,
653 _In_ ULONG LockKey,
654 _In_ PVOID Buffer,
655 _Out_ PIO_STATUS_BLOCK IoStatus,
656 _In_ PDEVICE_OBJECT DeviceObject);
657
658
659 NTSTATUS
660 NTAPI
661 NpFsdWrite(IN PDEVICE_OBJECT DeviceObject,
662 IN PIRP Irp);
663
664 NTSTATUS
665 NTAPI
666 NpFsdFlushBuffers(IN PDEVICE_OBJECT DeviceObject,
667 IN PIRP Irp);
668
669 NTSTATUS
670 NTAPI
671 NpFsdSetInformation(IN PDEVICE_OBJECT DeviceObject,
672 IN PIRP Irp);
673
674 NTSTATUS
675 NTAPI
676 NpFsdQueryInformation(IN PDEVICE_OBJECT DeviceObject,
677 IN PIRP Irp);
678
679
680 NTSTATUS
681 NTAPI
682 NpFsdQuerySecurityInfo(IN PDEVICE_OBJECT DeviceObject,
683 IN PIRP Irp);
684
685 NTSTATUS
686 NTAPI
687 NpFsdSetSecurityInfo(IN PDEVICE_OBJECT DeviceObject,
688 IN PIRP Irp);
689
690 NTSTATUS
691 NTAPI
692 NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,
693 IN PIRP Irp);
694
695 #endif /* _NPFS_PCH_ */