bca024ff22b8da8404d2a3641b859baea3eb315f
[reactos.git] / reactos / drivers / filesystems / ntfs / ntfs.h
1 #ifndef NTFS_H
2 #define NTFS_H
3
4 #include <ntifs.h>
5
6 #define CACHEPAGESIZE(pDeviceExt) \
7 ((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \
8 (pDeviceExt)->NtfsInfo.UCHARsPerCluster : PAGE_SIZE)
9
10 #define TAG_NTFS 'SFTN'
11
12 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
13
14 #define DEVICE_NAME L"\\Ntfs"
15
16 #include <pshpack1.h>
17 typedef struct _BIOS_PARAMETERS_BLOCK
18 {
19 USHORT BytesPerSector; // 0x0B
20 UCHAR SectorsPerCluster; // 0x0D
21 UCHAR Unused0[7]; // 0x0E, checked when volume is mounted
22 UCHAR MediaId; // 0x15
23 UCHAR Unused1[2]; // 0x16
24 USHORT SectorsPerTrack; // 0x18
25 USHORT Heads; // 0x1A
26 UCHAR Unused2[4]; // 0x1C
27 UCHAR Unused3[4]; // 0x20, checked when volume is mounted
28 } BIOS_PARAMETERS_BLOCK, *PBIOS_PARAMETERS_BLOCK;
29
30 typedef struct _EXTENDED_BIOS_PARAMETERS_BLOCK
31 {
32 USHORT Unknown[2]; // 0x24, always 80 00 80 00
33 ULONGLONG SectorCount; // 0x28
34 ULONGLONG MftLocation; // 0x30
35 ULONGLONG MftMirrLocation; // 0x38
36 CHAR ClustersPerMftRecord; // 0x40
37 UCHAR Unused4[3]; // 0x41
38 CHAR ClustersPerIndexRecord; // 0x44
39 UCHAR Unused5[3]; // 0x45
40 ULONGLONG SerialNumber; // 0x48
41 UCHAR Checksum[4]; // 0x50
42 } EXTENDED_BIOS_PARAMETERS_BLOCK, *PEXTENDED_BIOS_PARAMETERS_BLOCK;
43
44 typedef struct _BOOT_SECTOR
45 {
46 UCHAR Jump[3]; // 0x00
47 UCHAR OEMID[8]; // 0x03
48 BIOS_PARAMETERS_BLOCK BPB;
49 EXTENDED_BIOS_PARAMETERS_BLOCK EBPB;
50 UCHAR BootStrap[426]; // 0x54
51 USHORT EndSector; // 0x1FE
52 } BOOT_SECTOR, *PBOOT_SECTOR;
53 #include <poppack.h>
54
55 //typedef struct _BootSector BootSector;
56
57 typedef struct _NTFS_INFO
58 {
59 ULONG BytesPerSector;
60 ULONG SectorsPerCluster;
61 ULONG BytesPerCluster;
62 ULONGLONG SectorCount;
63 ULARGE_INTEGER MftStart;
64 ULARGE_INTEGER MftMirrStart;
65 ULONG BytesPerFileRecord;
66 ULONG BytesPerIndexRecord;
67
68 ULONGLONG SerialNumber;
69 USHORT VolumeLabelLength;
70 WCHAR VolumeLabel[MAXIMUM_VOLUME_LABEL_LENGTH];
71 UCHAR MajorVersion;
72 UCHAR MinorVersion;
73 USHORT Flags;
74
75 } NTFS_INFO, *PNTFS_INFO;
76
77 #define NTFS_TYPE_CCB '20SF'
78 #define NTFS_TYPE_FCB '30SF'
79 #define NTFS_TYPE_VCB '50SF'
80 #define NTFS_TYPE_IRP_CONTEST '60SF'
81 #define NTFS_TYPE_GLOBAL_DATA '70SF'
82
83 typedef struct
84 {
85 ULONG Type;
86 ULONG Size;
87 } NTFSIDENTIFIER, *PNTFSIDENTIFIER;
88
89 typedef struct
90 {
91 NTFSIDENTIFIER Identifier;
92
93 ERESOURCE DirResource;
94 // ERESOURCE FatResource;
95
96 KSPIN_LOCK FcbListLock;
97 LIST_ENTRY FcbListHead;
98
99 PVPB Vpb;
100 PDEVICE_OBJECT StorageDevice;
101 PFILE_OBJECT StreamFileObject;
102
103 struct _NTFS_ATTR_CONTEXT* MFTContext;
104 struct _FILE_RECORD_HEADER* MasterFileTable;
105 struct _FCB *VolumeFcb;
106
107 NTFS_INFO NtfsInfo;
108
109 } DEVICE_EXTENSION, *PDEVICE_EXTENSION, NTFS_VCB, *PNTFS_VCB;
110
111 typedef struct
112 {
113 NTFSIDENTIFIER Identifier;
114 LIST_ENTRY NextCCB;
115 PFILE_OBJECT PtrFileObject;
116 LARGE_INTEGER CurrentByteOffset;
117 /* for DirectoryControl */
118 ULONG Entry;
119 /* for DirectoryControl */
120 PWCHAR DirectorySearchPattern;
121 ULONG LastCluster;
122 ULONG LastOffset;
123 } NTFS_CCB, *PNTFS_CCB;
124
125 #define TAG_CCB 'BCCI'
126
127 typedef struct
128 {
129 NTFSIDENTIFIER Identifier;
130 ERESOURCE Resource;
131 PDRIVER_OBJECT DriverObject;
132 PDEVICE_OBJECT DeviceObject;
133 CACHE_MANAGER_CALLBACKS CacheMgrCallbacks;
134 ULONG Flags;
135 } NTFS_GLOBAL_DATA, *PNTFS_GLOBAL_DATA;
136
137
138 typedef enum
139 {
140 AttributeStandardInformation = 0x10,
141 AttributeAttributeList = 0x20,
142 AttributeFileName = 0x30,
143 AttributeObjectId = 0x40,
144 AttributeSecurityDescriptor = 0x50,
145 AttributeVolumeName = 0x60,
146 AttributeVolumeInformation = 0x70,
147 AttributeData = 0x80,
148 AttributeIndexRoot = 0x90,
149 AttributeIndexAllocation = 0xA0,
150 AttributeBitmap = 0xB0,
151 AttributeReparsePoint = 0xC0,
152 AttributeEAInformation = 0xD0,
153 AttributeEA = 0xE0,
154 AttributePropertySet = 0xF0,
155 AttributeLoggedUtilityStream = 0x100,
156 AttributeEnd = 0xFFFFFFFF
157 } ATTRIBUTE_TYPE, *PATTRIBUTE_TYPE;
158
159 #define NTFS_FILE_MFT 0
160 #define NTFS_FILE_MFTMIRR 1
161 #define NTFS_FILE_LOGFILE 2
162 #define NTFS_FILE_VOLUME 3
163 #define NTFS_FILE_ATTRDEF 4
164 #define NTFS_FILE_ROOT 5
165 #define NTFS_FILE_BITMAP 6
166 #define NTFS_FILE_BOOT 7
167 #define NTFS_FILE_BADCLUS 8
168 #define NTFS_FILE_QUOTA 9
169 #define NTFS_FILE_UPCASE 10
170 #define NTFS_FILE_EXTEND 11
171
172 #define COLLATION_BINARY 0x00
173 #define COLLATION_FILE_NAME 0x01
174 #define COLLATION_UNICODE_STRING 0x02
175 #define COLLATION_NTOFS_ULONG 0x10
176 #define COLLATION_NTOFS_SID 0x11
177 #define COLLATION_NTOFS_SECURITY_HASH 0x12
178 #define COLLATION_NTOFS_ULONGS 0x13
179
180 #define INDEX_ROOT_SMALL 0x0
181 #define INDEX_ROOT_LARGE 0x1
182
183 #define NTFS_INDEX_ENTRY_NODE 1
184 #define NTFS_INDEX_ENTRY_END 2
185
186 #define NTFS_FILE_NAME_POSIX 0
187 #define NTFS_FILE_NAME_WIN32 1
188 #define NTFS_FILE_NAME_DOS 2
189 #define NTFS_FILE_NAME_WIN32_AND_DOS 3
190
191 typedef struct
192 {
193 ULONG Type; /* Magic number 'FILE' */
194 USHORT UsaOffset; /* Offset to the update sequence */
195 USHORT UsaCount; /* Size in words of Update Sequence Number & Array (S) */
196 ULONGLONG Lsn; /* $LogFile Sequence Number (LSN) */
197 } NTFS_RECORD_HEADER, *PNTFS_RECORD_HEADER;
198
199 /* NTFS_RECORD_HEADER.Type */
200 #define NRH_FILE_TYPE 0x454C4946 /* 'FILE' */
201
202
203 typedef struct _FILE_RECORD_HEADER
204 {
205 NTFS_RECORD_HEADER Ntfs;
206 USHORT SequenceNumber; /* Sequence number */
207 USHORT LinkCount; /* Hard link count */
208 USHORT AttributeOffset; /* Offset to the first Attribute */
209 USHORT Flags; /* Flags */
210 ULONG BytesInUse; /* Real size of the FILE record */
211 ULONG BytesAllocated; /* Allocated size of the FILE record */
212 ULONGLONG BaseFileRecord; /* File reference to the base FILE record */
213 USHORT NextAttributeNumber; /* Next Attribute Id */
214 USHORT Pading; /* Align to 4 UCHAR boundary (XP) */
215 ULONG MFTRecordNumber; /* Number of this MFT Record (XP) */
216 } FILE_RECORD_HEADER, *PFILE_RECORD_HEADER;
217
218 /* Flags in FILE_RECORD_HEADER */
219
220 #define FRH_IN_USE 0x0001 /* Record is in use */
221 #define FRH_DIRECTORY 0x0002 /* Record is a directory */
222 #define FRH_UNKNOWN1 0x0004 /* Don't know */
223 #define FRH_UNKNOWN2 0x0008 /* Don't know */
224
225 typedef struct
226 {
227 ULONG Type;
228 ULONG Length;
229 UCHAR IsNonResident;
230 UCHAR NameLength;
231 USHORT NameOffset;
232 USHORT Flags;
233 USHORT Instance;
234 union
235 {
236 // Resident attributes
237 struct
238 {
239 ULONG ValueLength;
240 USHORT ValueOffset;
241 UCHAR Flags;
242 UCHAR Reserved;
243 } Resident;
244 // Non-resident attributes
245 struct
246 {
247 ULONGLONG LowestVCN;
248 ULONGLONG HighestVCN;
249 USHORT MappingPairsOffset;
250 USHORT CompressionUnit;
251 UCHAR Reserved[4];
252 LONGLONG AllocatedSize;
253 LONGLONG DataSize;
254 LONGLONG InitializedSize;
255 LONGLONG CompressedSize;
256 } NonResident;
257 };
258 } NTFS_ATTR_RECORD, *PNTFS_ATTR_RECORD;
259
260 typedef struct
261 {
262 ULONGLONG CreationTime;
263 ULONGLONG ChangeTime;
264 ULONGLONG LastWriteTime;
265 ULONGLONG LastAccessTime;
266 ULONG FileAttribute;
267 ULONG AlignmentOrReserved[3];
268 #if 0
269 ULONG QuotaId;
270 ULONG SecurityId;
271 ULONGLONG QuotaCharge;
272 USN Usn;
273 #endif
274 } STANDARD_INFORMATION, *PSTANDARD_INFORMATION;
275
276
277 typedef struct
278 {
279 ATTRIBUTE_TYPE AttributeType;
280 USHORT Length;
281 UCHAR NameLength;
282 UCHAR NameOffset;
283 ULONGLONG StartVcn; // LowVcn
284 ULONGLONG FileReferenceNumber;
285 USHORT AttributeNumber;
286 USHORT AlignmentOrReserved[3];
287 } ATTRIBUTE_LIST, *PATTRIBUTE_LIST;
288
289
290 typedef struct
291 {
292 ULONGLONG DirectoryFileReferenceNumber;
293 ULONGLONG CreationTime;
294 ULONGLONG ChangeTime;
295 ULONGLONG LastWriteTime;
296 ULONGLONG LastAccessTime;
297 ULONGLONG AllocatedSize;
298 ULONGLONG DataSize;
299 ULONG FileAttributes;
300 ULONG AlignmentOrReserved;
301 UCHAR NameLength;
302 UCHAR NameType;
303 WCHAR Name[1];
304 } FILENAME_ATTRIBUTE, *PFILENAME_ATTRIBUTE;
305
306 typedef struct
307 {
308 ULONG FirstEntryOffset;
309 ULONG TotalSizeOfEntries;
310 ULONG AllocatedSize;
311 UCHAR Flags;
312 UCHAR Padding[3];
313 } INDEX_HEADER_ATTRIBUTE, *PINDEX_HEADER_ATTRIBUTE;
314
315 typedef struct
316 {
317 ULONG AttributeType;
318 ULONG CollationRule;
319 ULONG SizeOfEntry;
320 UCHAR ClustersPerIndexRecord;
321 UCHAR Padding[3];
322 INDEX_HEADER_ATTRIBUTE Header;
323 } INDEX_ROOT_ATTRIBUTE, *PINDEX_ROOT_ATTRIBUTE;
324
325 typedef struct
326 {
327 union
328 {
329 struct
330 {
331 ULONGLONG IndexedFile;
332 } Directory;
333 struct
334 {
335 USHORT DataOffset;
336 USHORT DataLength;
337 ULONG Reserved;
338 } ViewIndex;
339 } Data;
340 USHORT Length;
341 USHORT KeyLength;
342 USHORT Flags;
343 USHORT Reserved;
344 FILENAME_ATTRIBUTE FileName;
345 } INDEX_ENTRY_ATTRIBUTE, *PINDEX_ENTRY_ATTRIBUTE;
346
347 typedef struct
348 {
349 ULONGLONG Unknown1;
350 UCHAR MajorVersion;
351 UCHAR MinorVersion;
352 USHORT Flags;
353 ULONG Unknown2;
354 } VOLINFO_ATTRIBUTE, *PVOLINFO_ATTRIBUTE;
355
356 typedef struct
357 {
358 NTFSIDENTIFIER Identifier;
359 ULONG Flags;
360 UCHAR MajorFunction;
361 UCHAR MinorFunction;
362 WORK_QUEUE_ITEM WorkQueueItem;
363 PIRP Irp;
364 BOOLEAN IsTopLevel;
365 PDEVICE_OBJECT DeviceObject;
366 NTSTATUS SavedExceptionCode;
367 } NTFS_IRP_CONTEXT, *PNTFS_IRP_CONTEXT;
368
369 typedef struct _NTFS_ATTR_CONTEXT
370 {
371 PUCHAR CacheRun;
372 ULONGLONG CacheRunOffset;
373 LONGLONG CacheRunStartLCN;
374 ULONGLONG CacheRunLength;
375 LONGLONG CacheRunLastLCN;
376 ULONGLONG CacheRunCurrentOffset;
377 NTFS_ATTR_RECORD Record;
378 } NTFS_ATTR_CONTEXT, *PNTFS_ATTR_CONTEXT;
379
380 #define FCB_CACHE_INITIALIZED 0x0001
381 #define FCB_IS_VOLUME_STREAM 0x0002
382 #define FCB_IS_VOLUME 0x0004
383 #define MAX_PATH 260
384
385 typedef struct _FCB
386 {
387 NTFSIDENTIFIER Identifier;
388
389 FSRTL_COMMON_FCB_HEADER RFCB;
390 SECTION_OBJECT_POINTERS SectionObjectPointers;
391
392 PFILE_OBJECT FileObject;
393 PNTFS_VCB Vcb;
394
395 WCHAR *ObjectName; /* point on filename (250 chars max) in PathName */
396 WCHAR PathName[MAX_PATH]; /* path+filename 260 max */
397
398 ERESOURCE PagingIoResource;
399 ERESOURCE MainResource;
400
401 LIST_ENTRY FcbListEntry;
402 struct _FCB* ParentFcb;
403
404 ULONG DirIndex;
405
406 LONG RefCount;
407 ULONG Flags;
408
409 ULONGLONG MFTIndex;
410
411 FILENAME_ATTRIBUTE Entry;
412
413 } NTFS_FCB, *PNTFS_FCB;
414
415 extern PNTFS_GLOBAL_DATA NtfsGlobalData;
416
417 //int CdfsStrcmpi( wchar_t *str1, wchar_t *str2 );
418 //void CdfsWstrcpy( wchar_t *str1, wchar_t *str2, int max );
419
420
421 /* attrib.c */
422
423 //VOID
424 //NtfsDumpAttribute(PATTRIBUTE Attribute);
425
426 PUCHAR
427 DecodeRun(PUCHAR DataRun,
428 LONGLONG *DataRunOffset,
429 ULONGLONG *DataRunLength);
430
431 VOID
432 NtfsDumpFileAttributes(PFILE_RECORD_HEADER FileRecord);
433
434 PFILENAME_ATTRIBUTE
435 GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord);
436
437 /* blockdev.c */
438
439 NTSTATUS
440 NtfsReadDisk(IN PDEVICE_OBJECT DeviceObject,
441 IN LONGLONG StartingOffset,
442 IN ULONG Length,
443 IN OUT PUCHAR Buffer,
444 IN BOOLEAN Override);
445
446 NTSTATUS
447 NtfsReadSectors(IN PDEVICE_OBJECT DeviceObject,
448 IN ULONG DiskSector,
449 IN ULONG SectorCount,
450 IN ULONG SectorSize,
451 IN OUT PUCHAR Buffer,
452 IN BOOLEAN Override);
453
454 NTSTATUS
455 NtfsDeviceIoControl(IN PDEVICE_OBJECT DeviceObject,
456 IN ULONG ControlCode,
457 IN PVOID InputBuffer,
458 IN ULONG InputBufferSize,
459 IN OUT PVOID OutputBuffer,
460 IN OUT PULONG OutputBufferSize,
461 IN BOOLEAN Override);
462
463
464 /* close.c */
465
466 DRIVER_DISPATCH NtfsFsdClose;
467 NTSTATUS NTAPI
468 NtfsFsdClose(PDEVICE_OBJECT DeviceObject,
469 PIRP Irp);
470
471
472 /* create.c */
473
474 DRIVER_DISPATCH NtfsFsdCreate;
475 NTSTATUS NTAPI
476 NtfsFsdCreate(PDEVICE_OBJECT DeviceObject,
477 PIRP Irp);
478
479
480 /* dirctl.c */
481
482 DRIVER_DISPATCH NtfsFsdDirectoryControl;
483 NTSTATUS NTAPI
484 NtfsFsdDirectoryControl(PDEVICE_OBJECT DeviceObject,
485 PIRP Irp);
486
487
488 /* dispatch.c */
489
490 DRIVER_DISPATCH NtfsFsdDispatch;
491 NTSTATUS NTAPI
492 NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject,
493 PIRP Irp);
494
495
496 /* fastio.c */
497
498 BOOLEAN NTAPI
499 NtfsAcqLazyWrite(PVOID Context,
500 BOOLEAN Wait);
501
502 VOID NTAPI
503 NtfsRelLazyWrite(PVOID Context);
504
505 BOOLEAN NTAPI
506 NtfsAcqReadAhead(PVOID Context,
507 BOOLEAN Wait);
508
509 VOID NTAPI
510 NtfsRelReadAhead(PVOID Context);
511
512
513 /* fcb.c */
514
515 PNTFS_FCB
516 NtfsCreateFCB(PCWSTR FileName,
517 PNTFS_VCB Vcb);
518
519 VOID
520 NtfsDestroyFCB(PNTFS_FCB Fcb);
521
522 BOOLEAN
523 NtfsFCBIsDirectory(PNTFS_FCB Fcb);
524
525 BOOLEAN
526 NtfsFCBIsRoot(PNTFS_FCB Fcb);
527
528 VOID
529 NtfsGrabFCB(PNTFS_VCB Vcb,
530 PNTFS_FCB Fcb);
531
532 VOID
533 NtfsReleaseFCB(PNTFS_VCB Vcb,
534 PNTFS_FCB Fcb);
535
536 VOID
537 NtfsAddFCBToTable(PNTFS_VCB Vcb,
538 PNTFS_FCB Fcb);
539
540 PNTFS_FCB
541 NtfsGrabFCBFromTable(PNTFS_VCB Vcb,
542 PCWSTR FileName);
543
544 NTSTATUS
545 NtfsFCBInitializeCache(PNTFS_VCB Vcb,
546 PNTFS_FCB Fcb);
547
548 PNTFS_FCB
549 NtfsMakeRootFCB(PNTFS_VCB Vcb);
550
551 PNTFS_FCB
552 NtfsOpenRootFCB(PNTFS_VCB Vcb);
553
554 NTSTATUS
555 NtfsAttachFCBToFileObject(PNTFS_VCB Vcb,
556 PNTFS_FCB Fcb,
557 PFILE_OBJECT FileObject);
558
559 NTSTATUS
560 NtfsGetFCBForFile(PNTFS_VCB Vcb,
561 PNTFS_FCB *pParentFCB,
562 PNTFS_FCB *pFCB,
563 const PWSTR pFileName);
564
565
566 /* finfo.c */
567
568 DRIVER_DISPATCH NtfsFsdQueryInformation;
569 NTSTATUS NTAPI
570 NtfsFsdQueryInformation(PDEVICE_OBJECT DeviceObject,
571 PIRP Irp);
572
573
574 /* fsctl.c */
575
576 DRIVER_DISPATCH NtfsFsdFileSystemControl;
577 NTSTATUS NTAPI
578 NtfsFsdFileSystemControl(PDEVICE_OBJECT DeviceObject,
579 PIRP Irp);
580
581
582 /* mft.c */
583 ULONG
584 ReadAttribute(PDEVICE_EXTENSION Vcb,
585 PNTFS_ATTR_CONTEXT Context,
586 ULONGLONG Offset,
587 PCHAR Buffer,
588 ULONG Length);
589
590 ULONGLONG
591 AttributeDataLength(PNTFS_ATTR_RECORD AttrRecord);
592
593 ULONG
594 AttributeAllocatedLength(PNTFS_ATTR_RECORD AttrRecord);
595
596 NTSTATUS
597 ReadFileRecord(PDEVICE_EXTENSION Vcb,
598 ULONGLONG index,
599 PFILE_RECORD_HEADER file);
600
601 NTSTATUS
602 FindAttribute(PDEVICE_EXTENSION Vcb,
603 PFILE_RECORD_HEADER MftRecord,
604 ULONG Type,
605 PUNICODE_STRING Name,
606 PNTFS_ATTR_CONTEXT * AttrCtx);
607
608 VOID
609 ReadVCN(PDEVICE_EXTENSION Vcb,
610 PFILE_RECORD_HEADER file,
611 ATTRIBUTE_TYPE type,
612 ULONGLONG vcn,
613 ULONG count,
614 PVOID buffer);
615
616 NTSTATUS
617 FixupUpdateSequenceArray(PDEVICE_EXTENSION Vcb,
618 PNTFS_RECORD_HEADER Record);
619
620 NTSTATUS
621 ReadLCN(PDEVICE_EXTENSION Vcb,
622 ULONGLONG lcn,
623 ULONG count,
624 PVOID buffer);
625
626 VOID
627 EnumerAttribute(PFILE_RECORD_HEADER file,
628 PDEVICE_EXTENSION Vcb,
629 PDEVICE_OBJECT DeviceObject);
630
631 NTSTATUS
632 NtfsLookupFile(PDEVICE_EXTENSION Vcb,
633 PUNICODE_STRING PathName,
634 PFILE_RECORD_HEADER *FileRecord,
635 PNTFS_ATTR_CONTEXT *DataContext,
636 PULONGLONG MFTIndex);
637
638 NTSTATUS
639 NtfsLookupFileAt(PDEVICE_EXTENSION Vcb,
640 PUNICODE_STRING PathName,
641 PFILE_RECORD_HEADER *FileRecord,
642 PNTFS_ATTR_CONTEXT *DataContext,
643 PULONGLONG MFTIndex,
644 ULONGLONG CurrentMFTIndex);
645
646 /* misc.c */
647
648 BOOLEAN
649 NtfsIsIrpTopLevel(PIRP Irp);
650
651 PNTFS_IRP_CONTEXT
652 NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject,
653 PIRP Irp);
654
655 #if 0
656 BOOLEAN
657 wstrcmpjoki(PWSTR s1, PWSTR s2);
658
659 VOID
660 CdfsSwapString(PWCHAR Out,
661 PUCHAR In,
662 ULONG Count);
663
664 VOID
665 CdfsDateTimeToFileTime(PFCB Fcb,
666 TIME *FileTime);
667
668 VOID
669 CdfsFileFlagsToAttributes(PFCB Fcb,
670 PULONG FileAttributes);
671 #endif
672
673
674 /* rw.c */
675
676 DRIVER_DISPATCH NtfsFsdRead;
677 NTSTATUS NTAPI
678 NtfsFsdRead(PDEVICE_OBJECT DeviceObject,
679 PIRP Irp);
680
681 DRIVER_DISPATCH NtfsFsdWrite;
682 NTSTATUS NTAPI
683 NtfsFsdWrite(PDEVICE_OBJECT DeviceObject,
684 PIRP Irp);
685
686
687 /* volinfo.c */
688
689 NTSTATUS
690 NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
691
692 NTSTATUS
693 NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
694
695
696 /* ntfs.c */
697
698 DRIVER_INITIALIZE DriverEntry;
699
700 VOID
701 NTAPI
702 NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject);
703
704 #endif /* NTFS_H */