5 #include <pseh/pseh2.h>
8 #define INIT_SECTION __attribute__((section ("INIT")))
10 #define INIT_SECTION /* Done via alloc_text for MSC */
13 #define CACHEPAGESIZE(pDeviceExt) \
14 ((pDeviceExt)->NtfsInfo.UCHARsPerCluster > PAGE_SIZE ? \
15 (pDeviceExt)->NtfsInfo.UCHARsPerCluster : PAGE_SIZE)
17 #define TAG_NTFS 'SFTN'
19 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
20 #define ROUND_DOWN(N, S) ((N) - ((N) % (S)))
22 #define DEVICE_NAME L"\\Ntfs"
25 typedef struct _BIOS_PARAMETERS_BLOCK
27 USHORT BytesPerSector
; // 0x0B
28 UCHAR SectorsPerCluster
; // 0x0D
29 UCHAR Unused0
[7]; // 0x0E, checked when volume is mounted
30 UCHAR MediaId
; // 0x15
31 UCHAR Unused1
[2]; // 0x16
32 USHORT SectorsPerTrack
; // 0x18
34 UCHAR Unused2
[4]; // 0x1C
35 UCHAR Unused3
[4]; // 0x20, checked when volume is mounted
36 } BIOS_PARAMETERS_BLOCK
, *PBIOS_PARAMETERS_BLOCK
;
38 typedef struct _EXTENDED_BIOS_PARAMETERS_BLOCK
40 USHORT Unknown
[2]; // 0x24, always 80 00 80 00
41 ULONGLONG SectorCount
; // 0x28
42 ULONGLONG MftLocation
; // 0x30
43 ULONGLONG MftMirrLocation
; // 0x38
44 CHAR ClustersPerMftRecord
; // 0x40
45 UCHAR Unused4
[3]; // 0x41
46 CHAR ClustersPerIndexRecord
; // 0x44
47 UCHAR Unused5
[3]; // 0x45
48 ULONGLONG SerialNumber
; // 0x48
49 UCHAR Checksum
[4]; // 0x50
50 } EXTENDED_BIOS_PARAMETERS_BLOCK
, *PEXTENDED_BIOS_PARAMETERS_BLOCK
;
52 typedef struct _BOOT_SECTOR
54 UCHAR Jump
[3]; // 0x00
55 UCHAR OEMID
[8]; // 0x03
56 BIOS_PARAMETERS_BLOCK BPB
;
57 EXTENDED_BIOS_PARAMETERS_BLOCK EBPB
;
58 UCHAR BootStrap
[426]; // 0x54
59 USHORT EndSector
; // 0x1FE
60 } BOOT_SECTOR
, *PBOOT_SECTOR
;
63 //typedef struct _BootSector BootSector;
65 typedef struct _NTFS_INFO
68 ULONG SectorsPerCluster
;
69 ULONG BytesPerCluster
;
70 ULONGLONG SectorCount
;
71 ULONGLONG ClusterCount
;
72 ULARGE_INTEGER MftStart
;
73 ULARGE_INTEGER MftMirrStart
;
74 ULONG BytesPerFileRecord
;
75 ULONG BytesPerIndexRecord
;
77 ULONGLONG SerialNumber
;
78 USHORT VolumeLabelLength
;
79 WCHAR VolumeLabel
[MAXIMUM_VOLUME_LABEL_LENGTH
];
84 ULONG MftZoneReservation
;
85 } NTFS_INFO
, *PNTFS_INFO
;
87 #define NTFS_TYPE_CCB '20SF'
88 #define NTFS_TYPE_FCB '30SF'
89 #define NTFS_TYPE_VCB '50SF'
90 #define NTFS_TYPE_IRP_CONTEXT '60SF'
91 #define NTFS_TYPE_GLOBAL_DATA '70SF'
97 } NTFSIDENTIFIER
, *PNTFSIDENTIFIER
;
101 NTFSIDENTIFIER Identifier
;
103 ERESOURCE DirResource
;
104 // ERESOURCE FatResource;
106 KSPIN_LOCK FcbListLock
;
107 LIST_ENTRY FcbListHead
;
110 PDEVICE_OBJECT StorageDevice
;
111 PFILE_OBJECT StreamFileObject
;
113 struct _NTFS_ATTR_CONTEXT
* MFTContext
;
114 struct _FILE_RECORD_HEADER
* MasterFileTable
;
115 struct _FCB
*VolumeFcb
;
120 ULONG OpenHandleCount
;
122 } DEVICE_EXTENSION
, *PDEVICE_EXTENSION
, NTFS_VCB
, *PNTFS_VCB
;
124 #define VCB_VOLUME_LOCKED 0x0001
128 NTFSIDENTIFIER Identifier
;
130 PFILE_OBJECT PtrFileObject
;
131 LARGE_INTEGER CurrentByteOffset
;
132 /* for DirectoryControl */
134 /* for DirectoryControl */
135 PWCHAR DirectorySearchPattern
;
138 } NTFS_CCB
, *PNTFS_CCB
;
140 #define TAG_CCB 'BCCI'
141 #define TAG_FCB 'BCFI'
145 NTFSIDENTIFIER Identifier
;
147 PDRIVER_OBJECT DriverObject
;
148 PDEVICE_OBJECT DeviceObject
;
149 CACHE_MANAGER_CALLBACKS CacheMgrCallbacks
;
151 FAST_IO_DISPATCH FastIoDispatch
;
152 NPAGED_LOOKASIDE_LIST IrpContextLookasideList
;
153 NPAGED_LOOKASIDE_LIST FcbLookasideList
;
154 } NTFS_GLOBAL_DATA
, *PNTFS_GLOBAL_DATA
;
159 AttributeStandardInformation
= 0x10,
160 AttributeAttributeList
= 0x20,
161 AttributeFileName
= 0x30,
162 AttributeObjectId
= 0x40,
163 AttributeSecurityDescriptor
= 0x50,
164 AttributeVolumeName
= 0x60,
165 AttributeVolumeInformation
= 0x70,
166 AttributeData
= 0x80,
167 AttributeIndexRoot
= 0x90,
168 AttributeIndexAllocation
= 0xA0,
169 AttributeBitmap
= 0xB0,
170 AttributeReparsePoint
= 0xC0,
171 AttributeEAInformation
= 0xD0,
173 AttributePropertySet
= 0xF0,
174 AttributeLoggedUtilityStream
= 0x100,
175 AttributeEnd
= 0xFFFFFFFF
176 } ATTRIBUTE_TYPE
, *PATTRIBUTE_TYPE
;
178 #define NTFS_FILE_MFT 0
179 #define NTFS_FILE_MFTMIRR 1
180 #define NTFS_FILE_LOGFILE 2
181 #define NTFS_FILE_VOLUME 3
182 #define NTFS_FILE_ATTRDEF 4
183 #define NTFS_FILE_ROOT 5
184 #define NTFS_FILE_BITMAP 6
185 #define NTFS_FILE_BOOT 7
186 #define NTFS_FILE_BADCLUS 8
187 #define NTFS_FILE_QUOTA 9
188 #define NTFS_FILE_UPCASE 10
189 #define NTFS_FILE_EXTEND 11
191 #define NTFS_MFT_MASK 0x0000FFFFFFFFFFFFULL
193 #define COLLATION_BINARY 0x00
194 #define COLLATION_FILE_NAME 0x01
195 #define COLLATION_UNICODE_STRING 0x02
196 #define COLLATION_NTOFS_ULONG 0x10
197 #define COLLATION_NTOFS_SID 0x11
198 #define COLLATION_NTOFS_SECURITY_HASH 0x12
199 #define COLLATION_NTOFS_ULONGS 0x13
201 #define INDEX_ROOT_SMALL 0x0
202 #define INDEX_ROOT_LARGE 0x1
204 #define NTFS_INDEX_ENTRY_NODE 1
205 #define NTFS_INDEX_ENTRY_END 2
207 #define NTFS_FILE_NAME_POSIX 0
208 #define NTFS_FILE_NAME_WIN32 1
209 #define NTFS_FILE_NAME_DOS 2
210 #define NTFS_FILE_NAME_WIN32_AND_DOS 3
212 #define NTFS_FILE_TYPE_READ_ONLY 0x1
213 #define NTFS_FILE_TYPE_HIDDEN 0x2
214 #define NTFS_FILE_TYPE_SYSTEM 0x4
215 #define NTFS_FILE_TYPE_ARCHIVE 0x20
216 #define NTFS_FILE_TYPE_REPARSE 0x400
217 #define NTFS_FILE_TYPE_COMPRESSED 0x800
218 #define NTFS_FILE_TYPE_DIRECTORY 0x10000000
222 ULONG Type
; /* Magic number 'FILE' */
223 USHORT UsaOffset
; /* Offset to the update sequence */
224 USHORT UsaCount
; /* Size in words of Update Sequence Number & Array (S) */
225 ULONGLONG Lsn
; /* $LogFile Sequence Number (LSN) */
226 } NTFS_RECORD_HEADER
, *PNTFS_RECORD_HEADER
;
228 /* NTFS_RECORD_HEADER.Type */
229 #define NRH_FILE_TYPE 0x454C4946 /* 'FILE' */
230 #define NRH_INDX_TYPE 0x58444E49 /* 'INDX' */
233 typedef struct _FILE_RECORD_HEADER
235 NTFS_RECORD_HEADER Ntfs
;
236 USHORT SequenceNumber
; /* Sequence number */
237 USHORT LinkCount
; /* Hard link count */
238 USHORT AttributeOffset
; /* Offset to the first Attribute */
239 USHORT Flags
; /* Flags */
240 ULONG BytesInUse
; /* Real size of the FILE record */
241 ULONG BytesAllocated
; /* Allocated size of the FILE record */
242 ULONGLONG BaseFileRecord
; /* File reference to the base FILE record */
243 USHORT NextAttributeNumber
; /* Next Attribute Id */
244 USHORT Padding
; /* Align to 4 UCHAR boundary (XP) */
245 ULONG MFTRecordNumber
; /* Number of this MFT Record (XP) */
246 } FILE_RECORD_HEADER
, *PFILE_RECORD_HEADER
;
248 /* Flags in FILE_RECORD_HEADER */
250 #define FRH_IN_USE 0x0001 /* Record is in use */
251 #define FRH_DIRECTORY 0x0002 /* Record is a directory */
252 #define FRH_UNKNOWN1 0x0004 /* Don't know */
253 #define FRH_UNKNOWN2 0x0008 /* Don't know */
266 // Resident attributes
274 // Non-resident attributes
278 ULONGLONG HighestVCN
;
279 USHORT MappingPairsOffset
;
280 USHORT CompressionUnit
;
282 LONGLONG AllocatedSize
;
284 LONGLONG InitializedSize
;
285 LONGLONG CompressedSize
;
288 } NTFS_ATTR_RECORD
, *PNTFS_ATTR_RECORD
;
292 ULONGLONG CreationTime
;
293 ULONGLONG ChangeTime
;
294 ULONGLONG LastWriteTime
;
295 ULONGLONG LastAccessTime
;
297 ULONG AlignmentOrReserved
[3];
301 ULONGLONG QuotaCharge
;
304 } STANDARD_INFORMATION
, *PSTANDARD_INFORMATION
;
309 ATTRIBUTE_TYPE AttributeType
;
313 ULONGLONG StartVcn
; // LowVcn
314 ULONGLONG FileReferenceNumber
;
315 USHORT AttributeNumber
;
316 USHORT AlignmentOrReserved
[3];
317 } ATTRIBUTE_LIST
, *PATTRIBUTE_LIST
;
322 ULONGLONG DirectoryFileReferenceNumber
;
323 ULONGLONG CreationTime
;
324 ULONGLONG ChangeTime
;
325 ULONGLONG LastWriteTime
;
326 ULONGLONG LastAccessTime
;
327 ULONGLONG AllocatedSize
;
329 ULONG FileAttributes
;
335 USHORT AlignmentOrReserved
;
342 } FILENAME_ATTRIBUTE
, *PFILENAME_ATTRIBUTE
;
346 ULONG FirstEntryOffset
;
347 ULONG TotalSizeOfEntries
;
351 } INDEX_HEADER_ATTRIBUTE
, *PINDEX_HEADER_ATTRIBUTE
;
358 UCHAR ClustersPerIndexRecord
;
360 INDEX_HEADER_ATTRIBUTE Header
;
361 } INDEX_ROOT_ATTRIBUTE
, *PINDEX_ROOT_ATTRIBUTE
;
365 NTFS_RECORD_HEADER Ntfs
;
367 INDEX_HEADER_ATTRIBUTE Header
;
368 } INDEX_BUFFER
, *PINDEX_BUFFER
;
376 ULONGLONG IndexedFile
;
389 FILENAME_ATTRIBUTE FileName
;
390 } INDEX_ENTRY_ATTRIBUTE
, *PINDEX_ENTRY_ATTRIBUTE
;
399 } VOLINFO_ATTRIBUTE
, *PVOLINFO_ATTRIBUTE
;
406 } REPARSE_POINT_ATTRIBUTE
, *PREPARSE_POINT_ATTRIBUTE
;
408 #define IRPCONTEXT_CANWAIT 0x1
409 #define IRPCONTEXT_COMPLETE 0x2
410 #define IRPCONTEXT_QUEUE 0x4
414 NTFSIDENTIFIER Identifier
;
416 PIO_STACK_LOCATION Stack
;
419 WORK_QUEUE_ITEM WorkQueueItem
;
422 PDEVICE_OBJECT DeviceObject
;
423 PFILE_OBJECT FileObject
;
424 NTSTATUS SavedExceptionCode
;
426 } NTFS_IRP_CONTEXT
, *PNTFS_IRP_CONTEXT
;
428 typedef struct _NTFS_ATTR_CONTEXT
431 ULONGLONG CacheRunOffset
;
432 LONGLONG CacheRunStartLCN
;
433 ULONGLONG CacheRunLength
;
434 LONGLONG CacheRunLastLCN
;
435 ULONGLONG CacheRunCurrentOffset
;
436 NTFS_ATTR_RECORD Record
;
437 } NTFS_ATTR_CONTEXT
, *PNTFS_ATTR_CONTEXT
;
439 #define FCB_CACHE_INITIALIZED 0x0001
440 #define FCB_IS_VOLUME_STREAM 0x0002
441 #define FCB_IS_VOLUME 0x0004
446 NTFSIDENTIFIER Identifier
;
448 FSRTL_COMMON_FCB_HEADER RFCB
;
449 SECTION_OBJECT_POINTERS SectionObjectPointers
;
451 PFILE_OBJECT FileObject
;
454 WCHAR Stream
[MAX_PATH
];
455 WCHAR
*ObjectName
; /* point on filename (250 chars max) in PathName */
456 WCHAR PathName
[MAX_PATH
]; /* path+filename 260 max */
458 ERESOURCE PagingIoResource
;
459 ERESOURCE MainResource
;
461 LIST_ENTRY FcbListEntry
;
462 struct _FCB
* ParentFcb
;
468 ULONG OpenHandleCount
;
473 FILENAME_ATTRIBUTE Entry
;
475 } NTFS_FCB
, *PNTFS_FCB
;
477 typedef struct _FIND_ATTR_CONTXT
479 PDEVICE_EXTENSION Vcb
;
480 BOOLEAN OnlyResident
;
481 PNTFS_ATTR_RECORD FirstAttr
;
482 PNTFS_ATTR_RECORD CurrAttr
;
483 PNTFS_ATTR_RECORD LastAttr
;
484 PNTFS_ATTR_RECORD NonResidentStart
;
485 PNTFS_ATTR_RECORD NonResidentEnd
;
487 } FIND_ATTR_CONTXT
, *PFIND_ATTR_CONTXT
;
493 } FIXUP_ARRAY
, *PFIXUP_ARRAY
;
495 extern PNTFS_GLOBAL_DATA NtfsGlobalData
;
499 NtfsMarkIrpContextForQueue(PNTFS_IRP_CONTEXT IrpContext
)
501 PULONG Flags
= &IrpContext
->Flags
;
503 *Flags
&= ~IRPCONTEXT_COMPLETE
;
504 *Flags
|= IRPCONTEXT_QUEUE
;
506 return STATUS_PENDING
;
512 //NtfsDumpAttribute(PATTRIBUTE Attribute);
515 DecodeRun(PUCHAR DataRun
,
516 LONGLONG
*DataRunOffset
,
517 ULONGLONG
*DataRunLength
);
520 NtfsDumpFileAttributes(PDEVICE_EXTENSION Vcb
,
521 PFILE_RECORD_HEADER FileRecord
);
523 PSTANDARD_INFORMATION
524 GetStandardInformationFromRecord(PDEVICE_EXTENSION Vcb
,
525 PFILE_RECORD_HEADER FileRecord
);
528 GetFileNameFromRecord(PDEVICE_EXTENSION Vcb
,
529 PFILE_RECORD_HEADER FileRecord
,
533 GetBestFileNameFromRecord(PDEVICE_EXTENSION Vcb
,
534 PFILE_RECORD_HEADER FileRecord
);
537 FindFirstAttribute(PFIND_ATTR_CONTXT Context
,
538 PDEVICE_EXTENSION Vcb
,
539 PFILE_RECORD_HEADER FileRecord
,
540 BOOLEAN OnlyResident
,
541 PNTFS_ATTR_RECORD
* Attribute
);
544 FindNextAttribute(PFIND_ATTR_CONTXT Context
,
545 PNTFS_ATTR_RECORD
* Attribute
);
548 FindCloseAttribute(PFIND_ATTR_CONTXT Context
);
553 NtfsReadDisk(IN PDEVICE_OBJECT DeviceObject
,
554 IN LONGLONG StartingOffset
,
557 IN OUT PUCHAR Buffer
,
558 IN BOOLEAN Override
);
561 NtfsWriteDisk(IN PDEVICE_OBJECT DeviceObject
,
562 IN LONGLONG StartingOffset
,
565 IN
const PUCHAR Buffer
);
568 NtfsReadSectors(IN PDEVICE_OBJECT DeviceObject
,
570 IN ULONG SectorCount
,
572 IN OUT PUCHAR Buffer
,
573 IN BOOLEAN Override
);
576 NtfsDeviceIoControl(IN PDEVICE_OBJECT DeviceObject
,
577 IN ULONG ControlCode
,
578 IN PVOID InputBuffer
,
579 IN ULONG InputBufferSize
,
580 IN OUT PVOID OutputBuffer
,
581 IN OUT PULONG OutputBufferSize
,
582 IN BOOLEAN Override
);
588 NtfsCleanup(PNTFS_IRP_CONTEXT IrpContext
);
594 NtfsCloseFile(PDEVICE_EXTENSION DeviceExt
,
595 PFILE_OBJECT FileObject
);
598 NtfsClose(PNTFS_IRP_CONTEXT IrpContext
);
604 NtfsCreate(PNTFS_IRP_CONTEXT IrpContext
);
610 NtfsDeviceControl(PNTFS_IRP_CONTEXT IrpContext
);
616 NtfsGetFileSize(PDEVICE_EXTENSION DeviceExt
,
617 PFILE_RECORD_HEADER FileRecord
,
620 PULONGLONG AllocatedSize
);
623 NtfsDirectoryControl(PNTFS_IRP_CONTEXT IrpContext
);
628 DRIVER_DISPATCH NtfsFsdDispatch
;
630 NtfsFsdDispatch(PDEVICE_OBJECT DeviceObject
,
637 NtfsAcqLazyWrite(PVOID Context
,
641 NtfsRelLazyWrite(PVOID Context
);
644 NtfsAcqReadAhead(PVOID Context
,
648 NtfsRelReadAhead(PVOID Context
);
650 FAST_IO_CHECK_IF_POSSIBLE NtfsFastIoCheckIfPossible
;
651 FAST_IO_READ NtfsFastIoRead
;
652 FAST_IO_WRITE NtfsFastIoWrite
;
658 NtfsCreateFCB(PCWSTR FileName
,
663 NtfsDestroyFCB(PNTFS_FCB Fcb
);
666 NtfsFCBIsDirectory(PNTFS_FCB Fcb
);
669 NtfsFCBIsReparsePoint(PNTFS_FCB Fcb
);
672 NtfsFCBIsCompressed(PNTFS_FCB Fcb
);
675 NtfsFCBIsRoot(PNTFS_FCB Fcb
);
678 NtfsGrabFCB(PNTFS_VCB Vcb
,
682 NtfsReleaseFCB(PNTFS_VCB Vcb
,
686 NtfsAddFCBToTable(PNTFS_VCB Vcb
,
690 NtfsGrabFCBFromTable(PNTFS_VCB Vcb
,
694 NtfsFCBInitializeCache(PNTFS_VCB Vcb
,
698 NtfsMakeRootFCB(PNTFS_VCB Vcb
);
701 NtfsOpenRootFCB(PNTFS_VCB Vcb
);
704 NtfsAttachFCBToFileObject(PNTFS_VCB Vcb
,
706 PFILE_OBJECT FileObject
);
709 NtfsGetFCBForFile(PNTFS_VCB Vcb
,
710 PNTFS_FCB
*pParentFCB
,
712 const PWSTR pFileName
);
715 NtfsReadFCBAttribute(PNTFS_VCB Vcb
,
723 NtfsMakeFCBFromDirEntry(PNTFS_VCB Vcb
,
724 PNTFS_FCB DirectoryFCB
,
725 PUNICODE_STRING Name
,
727 PFILE_RECORD_HEADER Record
,
729 PNTFS_FCB
* fileFCB
);
735 NtfsQueryInformation(PNTFS_IRP_CONTEXT IrpContext
);
741 NtfsFileSystemControl(PNTFS_IRP_CONTEXT IrpContext
);
746 PrepareAttributeContext(PNTFS_ATTR_RECORD AttrRecord
);
749 ReleaseAttributeContext(PNTFS_ATTR_CONTEXT Context
);
752 ReadAttribute(PDEVICE_EXTENSION Vcb
,
753 PNTFS_ATTR_CONTEXT Context
,
759 WriteAttribute(PDEVICE_EXTENSION Vcb
,
760 PNTFS_ATTR_CONTEXT Context
,
764 PULONG LengthWritten
);
767 AttributeDataLength(PNTFS_ATTR_RECORD AttrRecord
);
770 SetAttributeDataLength(PFILE_OBJECT FileObject
,
772 PNTFS_ATTR_CONTEXT AttrContext
,
774 PFILE_RECORD_HEADER FileRecord
,
775 PDEVICE_EXTENSION DeviceExt
,
776 PLARGE_INTEGER DataSize
);
779 AttributeAllocatedLength(PNTFS_ATTR_RECORD AttrRecord
);
782 ReadFileRecord(PDEVICE_EXTENSION Vcb
,
784 PFILE_RECORD_HEADER file
);
787 UpdateFileRecord(PDEVICE_EXTENSION Vcb
,
789 PFILE_RECORD_HEADER file
);
792 FindAttribute(PDEVICE_EXTENSION Vcb
,
793 PFILE_RECORD_HEADER MftRecord
,
797 PNTFS_ATTR_CONTEXT
* AttrCtx
,
801 ReadVCN(PDEVICE_EXTENSION Vcb
,
802 PFILE_RECORD_HEADER file
,
809 FixupUpdateSequenceArray(PDEVICE_EXTENSION Vcb
,
810 PNTFS_RECORD_HEADER Record
);
813 AddFixupArray(PDEVICE_EXTENSION Vcb
,
814 PNTFS_RECORD_HEADER Record
);
817 ReadLCN(PDEVICE_EXTENSION Vcb
,
823 EnumerAttribute(PFILE_RECORD_HEADER file
,
824 PDEVICE_EXTENSION Vcb
,
825 PDEVICE_OBJECT DeviceObject
);
828 NtfsLookupFile(PDEVICE_EXTENSION Vcb
,
829 PUNICODE_STRING PathName
,
830 PFILE_RECORD_HEADER
*FileRecord
,
831 PULONGLONG MFTIndex
);
834 NtfsLookupFileAt(PDEVICE_EXTENSION Vcb
,
835 PUNICODE_STRING PathName
,
836 PFILE_RECORD_HEADER
*FileRecord
,
838 ULONGLONG CurrentMFTIndex
);
841 NtfsFindFileAt(PDEVICE_EXTENSION Vcb
,
842 PUNICODE_STRING SearchPattern
,
844 PFILE_RECORD_HEADER
*FileRecord
,
846 ULONGLONG CurrentMFTIndex
);
851 NtfsIsIrpTopLevel(PIRP Irp
);
854 NtfsAllocateIrpContext(PDEVICE_OBJECT DeviceObject
,
858 NtfsGetUserBuffer(PIRP Irp
,
862 NtfsLockUserBuffer(IN PIRP Irp
,
864 IN LOCK_OPERATION Operation
);
868 wstrcmpjoki(PWSTR s1
, PWSTR s2
);
871 CdfsSwapString(PWCHAR Out
,
877 NtfsFileFlagsToAttributes(ULONG NtfsAttributes
,
878 PULONG FileAttributes
);
884 NtfsRead(PNTFS_IRP_CONTEXT IrpContext
);
887 NtfsWrite(PNTFS_IRP_CONTEXT IrpContext
);
893 NtfsGetFreeClusters(PDEVICE_EXTENSION DeviceExt
);
896 NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext
);
899 NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext
);
904 DRIVER_INITIALIZE DriverEntry
;
908 NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject
);