|
ReactOS 0.4.17-dev-1190-g4c812f4
|

Go to the source code of this file.
Macros | |
| #define | NDEBUG |
Functions | |||||||||||||||
| PNTFS_ATTR_CONTEXT | PrepareAttributeContext (PNTFS_ATTR_RECORD AttrRecord) | ||||||||||||||
| VOID | ReleaseAttributeContext (PNTFS_ATTR_CONTEXT Context) | ||||||||||||||
FindAttribute | |||||||||||||||
@implemented Searches a file record for an attribute matching the given type and name.
| |||||||||||||||
| NTSTATUS | FindAttribute (PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, ULONG Type, PCWSTR Name, ULONG NameLength, PNTFS_ATTR_CONTEXT *AttrCtx, PULONG Offset) | ||||||||||||||
| ULONGLONG | AttributeAllocatedLength (PNTFS_ATTR_RECORD AttrRecord) | ||||||||||||||
| ULONGLONG | AttributeDataLength (PNTFS_ATTR_RECORD AttrRecord) | ||||||||||||||
IncreaseMftSize | |||||||||||||||
@implemented Increases the size of the master file table on a volume, increasing the space available for file records.
| |||||||||||||||
| NTSTATUS | IncreaseMftSize (PDEVICE_EXTENSION Vcb, BOOLEAN CanWait) | ||||||||||||||
MoveAttributes | |||||||||||||||
@implemented Moves a block of attributes to a new location in the file Record. The attribute at FirstAttributeToMove and every attribute after that will be moved to MoveTo.
| |||||||||||||||
| PNTFS_ATTR_RECORD | MoveAttributes (PDEVICE_EXTENSION DeviceExt, PNTFS_ATTR_RECORD FirstAttributeToMove, ULONG FirstAttributeOffset, ULONG_PTR MoveTo) | ||||||||||||||
| NTSTATUS | InternalSetResidentAttributeLength (PDEVICE_EXTENSION DeviceExt, PNTFS_ATTR_CONTEXT AttrContext, PFILE_RECORD_HEADER FileRecord, ULONG AttrOffset, ULONG DataSize) | ||||||||||||||
| NTSTATUS | SetAttributeDataLength (PFILE_OBJECT FileObject, PNTFS_FCB Fcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, PLARGE_INTEGER DataSize) | ||||||||||||||
SetFileRecordEnd | |||||||||||||||
@implemented This small function sets a new endpoint for the file record. It set's the final AttrEnd->Type to AttributeEnd and recalculates the bytes used by the file record.
| |||||||||||||||
| VOID | SetFileRecordEnd (PFILE_RECORD_HEADER FileRecord, PNTFS_ATTR_RECORD AttrEnd, ULONG EndMarker) | ||||||||||||||
NtfsExtendAllocation | |||||||||||||||
@implemented Assigns clusters to a non-resident attribute until its allocation reaches AllocationSize. Data size is left alone, so this also reserves room ahead of a growing file.
| |||||||||||||||
| NTSTATUS | NtfsExtendAllocation (_In_ PDEVICE_EXTENSION Vcb, _In_ PNTFS_ATTR_CONTEXT AttrContext, _In_ ULONG AttrOffset, _In_ PFILE_RECORD_HEADER FileRecord, _In_ ULONGLONG AllocationSize) | ||||||||||||||
NtfsTrimAllocation | |||||||||||||||
@implemented Gives back clusters a growing file reserved past its end. Called when the last handle goes away.
| |||||||||||||||
| NTSTATUS | NtfsTrimAllocation (_In_ PNTFS_FCB Fcb) | ||||||||||||||
NtfsResizeAllocation | |||||||||||||||
@implemented Sets how many clusters the data stream owns, leaving its size alone.
| |||||||||||||||
| NTSTATUS | NtfsResizeAllocation (_In_ PNTFS_FCB Fcb, _In_ PFILE_OBJECT FileObject, _In_ BOOLEAN CaseSensitive, _In_ ULONGLONG AllocationSize) | ||||||||||||||
SetNonResidentAttributeDataLength | |||||||||||||||
@implemented Called by SetAttributeDataLength() and IncreaseMftSize() to set the size of a non-resident attribute. Doesn't update the file record.
| |||||||||||||||
| NTSTATUS | SetNonResidentAttributeDataLength (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, PLARGE_INTEGER DataSize) | ||||||||||||||
SetResidentAttributeDataLength | |||||||||||||||
@implemented Called by SetAttributeDataLength() to set the size of a non-resident attribute. Doesn't update the file record.
| |||||||||||||||
| NTSTATUS | SetResidentAttributeDataLength (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, PLARGE_INTEGER DataSize) | ||||||||||||||
NtfsMapAttributeRuns | |||||||||||||||
@implemented Maps a byte range of a non-resident attribute onto the volume, collecting the physically contiguous runs it spans into a run list.
| |||||||||||||||
| static NTSTATUS | NtfsMapAttributeRuns (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, ULONG Length, PNTFS_IO_RUN_LIST RunList, PULONG MappedLength) | ||||||||||||||
ReadAttributeToIrp | |||||||||||||||
@implemented Reads a range of an attribute, serving it out of the given IRP where the shape of the request allows it.
| |||||||||||||||
| ULONG | ReadAttributeToIrp (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONG Length, PIRP Irp) | ||||||||||||||
| ULONG | ReadAttribute (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONG Length) | ||||||||||||||
WriteAttribute | |||||||||||||||
@implemented Writes an NTFS attribute to the disk. It presently borrows a lot of code from ReadAttribute(), and it still needs more documentation / cleaning up.
| |||||||||||||||
| NTSTATUS | WriteAttributeFromIrp (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, const PUCHAR Buffer, ULONG Length, PULONG RealLengthWritten, PFILE_RECORD_HEADER FileRecord, PIRP Irp) | ||||||||||||||
| NTSTATUS | WriteAttribute (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, const PUCHAR Buffer, ULONG Length, PULONG RealLengthWritten, PFILE_RECORD_HEADER FileRecord) | ||||||||||||||
NtfsReadUpCaseTable | |||||||||||||||
@implemented Loads the volume's $UpCase file, which defines how NTFS folds case.
| |||||||||||||||
| static NTSTATUS | NtfsReadUpCaseTable (PDEVICE_EXTENSION Vcb) | ||||||||||||||
| NTSTATUS | NtfsLoadUpCaseTable (PDEVICE_EXTENSION Vcb) | ||||||||||||||
| NTSTATUS | ReadFileRecord (PDEVICE_EXTENSION Vcb, ULONGLONG index, PFILE_RECORD_HEADER file) | ||||||||||||||
NtfsUpdateDuplicatedInformation | |||||||||||||||
@implemented Pushes the fields NTFS keeps in more than one place out to all of them.
The file record is written back here, so callers need not write it again. The directory flag is the one field that does not come from $STANDARD_INFORMATION – NTFS masks it out of there and keeps it in the record header – so it is restored from the header on the way past. | |||||||||||||||
| NTSTATUS | NtfsUpdateDuplicatedInformation (PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord, ULONGLONG MFTIndex, ULONG Flags, BOOLEAN CaseSensitive) | ||||||||||||||
| static NTSTATUS | UpdateFileNameRecordWorker (PDEVICE_EXTENSION Vcb, ULONGLONG ParentMFTIndex, PUNICODE_STRING FileName, BOOLEAN DirSearch, PNTFS_FILENAME_UPDATE Update, BOOLEAN CaseSensitive) | ||||||||||||||
| NTSTATUS | UpdateFileNameRecord (PDEVICE_EXTENSION Vcb, ULONGLONG ParentMFTIndex, PUNICODE_STRING FileName, BOOLEAN DirSearch, PNTFS_FILENAME_UPDATE Update, BOOLEAN CaseSensitive) | ||||||||||||||
| NTSTATUS | UpdateIndexEntryFileName (PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, PCHAR IndexRecord, ULONG IndexBlockSize, PINDEX_ENTRY_ATTRIBUTE FirstEntry, PINDEX_ENTRY_ATTRIBUTE LastEntry, PUNICODE_STRING FileName, PULONG StartEntry, PULONG CurrentEntry, BOOLEAN DirSearch, PNTFS_FILENAME_UPDATE Update, BOOLEAN CaseSensitive) | ||||||||||||||
UpdateFileRecord | |||||||||||||||
@implemented Writes a file record to the master file table, at a given index.
| |||||||||||||||
| NTSTATUS | UpdateFileRecord (PDEVICE_EXTENSION Vcb, ULONGLONG MftIndex, PFILE_RECORD_HEADER FileRecord) | ||||||||||||||
| NTSTATUS | FixupUpdateSequenceArray (PDEVICE_EXTENSION Vcb, PNTFS_RECORD_HEADER Record) | ||||||||||||||
AddNewMftEntry | |||||||||||||||
@implemented Adds a file record to the master file table of a given device.
| |||||||||||||||
| NTSTATUS | AddNewMftEntry (PFILE_RECORD_HEADER FileRecord, PDEVICE_EXTENSION DeviceExt, PULONGLONG DestinationIndex, BOOLEAN CanWait) | ||||||||||||||
GetMaxIndexRootSize | |||||||||||||||
@implemented Calculates how many bytes of index entries the index root can hold, given the space left in the file record.
| |||||||||||||||
| static ULONG | GetMaxIndexRootSize (PDEVICE_EXTENSION DeviceExt, PFILE_RECORD_HEADER FileRecord, ULONG IndexRootOffset, PNTFS_ATTR_RECORD IndexRootRecord) | ||||||||||||||
NtfsAddFilenameToDirectory | |||||||||||||||
@implemented Adds a $FILE_NAME attribute to a given directory index.
| |||||||||||||||
| static NTSTATUS | AddFilenameToDirectoryWorker (PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, ULONGLONG FileReferenceNumber, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive) | ||||||||||||||
| NTSTATUS | NtfsAddFilenameToDirectory (PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, ULONGLONG FileReferenceNumber, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive) | ||||||||||||||
NtfsRemoveFilenameFromDirectory | |||||||||||||||
@implemented Removes a $FILE_NAME attribute from a given directory index.
| |||||||||||||||
| static NTSTATUS | RemoveFilenameFromDirectoryWorker (PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive) | ||||||||||||||
| NTSTATUS | NtfsRemoveFilenameFromDirectory (PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive) | ||||||||||||||
FreeMftEntry | |||||||||||||||
@implemented Releases an MFT record back to the volume, clearing its bit in the master file table's $Bitmap attribute and marking the record itself as no longer in use.
| |||||||||||||||
| NTSTATUS | FreeMftEntry (PDEVICE_EXTENSION DeviceExt, ULONGLONG MftIndex) | ||||||||||||||
NtfsDeleteFileRecord | |||||||||||||||
@implemented Deletes a file or empty directory: releases every cluster its non-resident attributes hold, removes each of its names from the parent index, and frees its MFT record.
| |||||||||||||||
| NTSTATUS | NtfsDeleteFileRecord (PDEVICE_EXTENSION DeviceExt, ULONGLONG MftIndex, BOOLEAN CaseSensitive) | ||||||||||||||
| NTSTATUS | AddFixupArray (PDEVICE_EXTENSION Vcb, PNTFS_RECORD_HEADER Record) | ||||||||||||||
| NTSTATUS | ReadLCN (PDEVICE_EXTENSION Vcb, ULONGLONG lcn, ULONG count, PVOID buffer) | ||||||||||||||
| BOOLEAN | CompareFileName (PDEVICE_EXTENSION Vcb, PUNICODE_STRING FileName, PINDEX_ENTRY_ATTRIBUTE IndexEntry, BOOLEAN DirSearch, BOOLEAN CaseSensitive) | ||||||||||||||
UpdateMftMirror | |||||||||||||||
@implemented Backs-up the first ~4 master file table entries to the $MFTMirr file.
STATUS_SUCCESS on success. STATUS_INSUFFICIENT_RESOURCES if an allocation failed. STATUS_UNSUCCESSFUL if we couldn't read the master file table.
| |||||||||||||||
| NTSTATUS | UpdateMftMirror (PNTFS_VCB Vcb) | ||||||||||||||
| NTSTATUS | BrowseSubNodeIndexEntries (PNTFS_VCB Vcb, PFILE_RECORD_HEADER MftRecord, ULONG IndexBlockSize, PUNICODE_STRING FileName, PNTFS_ATTR_CONTEXT IndexAllocationContext, PRTL_BITMAP Bitmap, ULONGLONG VCN, PULONG StartEntry, PULONG CurrentEntry, BOOLEAN DirSearch, BOOLEAN CaseSensitive, ULONGLONG *OutMFTIndex) | ||||||||||||||
| NTSTATUS | BrowseIndexEntries (PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, PINDEX_ROOT_ATTRIBUTE IndexRecord, ULONG IndexBlockSize, PINDEX_ENTRY_ATTRIBUTE FirstEntry, PINDEX_ENTRY_ATTRIBUTE LastEntry, PUNICODE_STRING FileName, PULONG StartEntry, PULONG CurrentEntry, BOOLEAN DirSearch, BOOLEAN CaseSensitive, ULONGLONG *OutMFTIndex) | ||||||||||||||
| NTSTATUS | NtfsFindMftRecord (PDEVICE_EXTENSION Vcb, ULONGLONG MFTIndex, PUNICODE_STRING FileName, PULONG FirstEntry, BOOLEAN DirSearch, BOOLEAN CaseSensitive, ULONGLONG *OutMFTIndex) | ||||||||||||||
| NTSTATUS | NtfsLookupFileAt (PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex, ULONGLONG CurrentMFTIndex) | ||||||||||||||
| NTSTATUS | NtfsLookupFile (PDEVICE_EXTENSION Vcb, PUNICODE_STRING PathName, BOOLEAN CaseSensitive, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex) | ||||||||||||||
| void | NtfsDumpData (ULONG_PTR Buffer, ULONG Length) | ||||||||||||||
NtfsIndexNodeIsEmpty | |||||||||||||||
Reads the index node at Vcn and reports whether its subtree holds any entry. | |||||||||||||||
| static NTSTATUS | NtfsIndexNodeIsEmpty (_In_ PDEVICE_EXTENSION Vcb, _In_ PNTFS_ATTR_CONTEXT IndexAllocationContext, _In_ ULONG IndexBlockSize, _In_ ULONGLONG Vcn, _In_ ULONG Depth, _Out_ PBOOLEAN Empty) | ||||||||||||||
NtfsIsDirectoryEmpty | |||||||||||||||
@implemented Decides whether a directory may be deleted. Unlike a name lookup, a sub-node that can't be read is an error here rather than a miss, since it may hold children.
| |||||||||||||||
| NTSTATUS | NtfsIsDirectoryEmpty (_In_ PDEVICE_EXTENSION Vcb, _In_ ULONGLONG MftIndex, _Out_ PBOOLEAN Empty) | ||||||||||||||
NtfsDumpFileRecord | |||||
@implemented Provides diagnostic information about a file record. Prints a hex dump of the entire record (based on the size reported by FileRecord->ByesInUse), then prints a dump of each attribute.
| |||||
| #define | NTFS_MAX_INDEX_DEPTH 32 | ||||
| VOID | NtfsDumpFileRecord (PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER FileRecord) | ||||
| NTSTATUS | NtfsFindFileAt (PDEVICE_EXTENSION Vcb, PUNICODE_STRING SearchPattern, PULONG FirstEntry, PFILE_RECORD_HEADER *FileRecord, PULONGLONG MFTIndex, ULONGLONG CurrentMFTIndex, BOOLEAN CaseSensitive) | ||||
| static NTSTATUS | NtfsIndexEntriesAreEmpty (_In_ PDEVICE_EXTENSION Vcb, _In_ PNTFS_ATTR_CONTEXT IndexAllocationContext, _In_ ULONG IndexBlockSize, _In_ PINDEX_HEADER_ATTRIBUTE Header, _In_ ULONG Depth, _Out_ PBOOLEAN Empty) | ||||
|
static |
Definition at line 2704 of file mft.c.
Referenced by NtfsAddFilenameToDirectory().
| NTSTATUS AddFixupArray | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_RECORD_HEADER | Record | ||
| ) |
Definition at line 3575 of file mft.c.
Referenced by CreateIndexBufferFromBTreeNode(), UpdateFileRecord(), and UpdateIndexEntryFileName().
| NTSTATUS AddNewMftEntry | ( | PFILE_RECORD_HEADER | FileRecord, |
| PDEVICE_EXTENSION | DeviceExt, | ||
| PULONGLONG | DestinationIndex, | ||
| BOOLEAN | CanWait | ||
| ) |
Definition at line 2482 of file mft.c.
Referenced by AddNewMftEntry(), NtfsCreateDirectory(), and NtfsCreateFileRecord().
| ULONGLONG AttributeAllocatedLength | ( | PNTFS_ATTR_RECORD | AttrRecord | ) |
Definition at line 249 of file mft.c.
Referenced by NtfsGetFileSize(), NtfsGetStreamInformation(), and NtfsReadFile().
| ULONGLONG AttributeDataLength | ( | PNTFS_ATTR_RECORD | AttrRecord | ) |
Definition at line 259 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), FreeMftEntry(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsGetFileSize(), NtfsGetStreamInformation(), NtfsGetVolumeData(), NtfsIsDirectoryEmpty(), NtfsLoadVolumeBitmap(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsReadUpCaseTable(), NtfsSetEndOfFile(), NtfsWriteFile(), PrintAllVCNs(), RemoveFilenameFromDirectoryWorker(), SetAttributeDataLength(), UpdateFileNameRecordWorker(), UpdateIndexEntryFileName(), and UpdateMftMirror().
| NTSTATUS BrowseIndexEntries | ( | PDEVICE_EXTENSION | Vcb, |
| PFILE_RECORD_HEADER | MftRecord, | ||
| PINDEX_ROOT_ATTRIBUTE | IndexRecord, | ||
| ULONG | IndexBlockSize, | ||
| PINDEX_ENTRY_ATTRIBUTE | FirstEntry, | ||
| PINDEX_ENTRY_ATTRIBUTE | LastEntry, | ||
| PUNICODE_STRING | FileName, | ||
| PULONG | StartEntry, | ||
| PULONG | CurrentEntry, | ||
| BOOLEAN | DirSearch, | ||
| BOOLEAN | CaseSensitive, | ||
| ULONGLONG * | OutMFTIndex | ||
| ) |
Definition at line 3976 of file mft.c.
Referenced by NtfsFindMftRecord().
| NTSTATUS BrowseSubNodeIndexEntries | ( | PNTFS_VCB | Vcb, |
| PFILE_RECORD_HEADER | MftRecord, | ||
| ULONG | IndexBlockSize, | ||
| PUNICODE_STRING | FileName, | ||
| PNTFS_ATTR_CONTEXT | IndexAllocationContext, | ||
| PRTL_BITMAP | Bitmap, | ||
| ULONGLONG | VCN, | ||
| PULONG | StartEntry, | ||
| PULONG | CurrentEntry, | ||
| BOOLEAN | DirSearch, | ||
| BOOLEAN | CaseSensitive, | ||
| ULONGLONG * | OutMFTIndex | ||
| ) |
Definition at line 3815 of file mft.c.
Referenced by BrowseIndexEntries(), and BrowseSubNodeIndexEntries().
| BOOLEAN CompareFileName | ( | PDEVICE_EXTENSION | Vcb, |
| PUNICODE_STRING | FileName, | ||
| PINDEX_ENTRY_ATTRIBUTE | IndexEntry, | ||
| BOOLEAN | DirSearch, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 3622 of file mft.c.
Referenced by BrowseIndexEntries(), BrowseSubNodeIndexEntries(), and UpdateIndexEntryFileName().
| NTSTATUS FindAttribute | ( | PDEVICE_EXTENSION | Vcb, |
| PFILE_RECORD_HEADER | MftRecord, | ||
| ULONG | Type, | ||
| PCWSTR | Name, | ||
| ULONG | NameLength, | ||
| PNTFS_ATTR_CONTEXT * | AttrCtx, | ||
| PULONG | Offset | ||
| ) |
Definition at line 131 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), CreateBTreeFromIndex(), tinyxml2::XMLElement::FindAttribute(), FindAttribute(), FreeMftEntry(), IncreaseMftSize(), NtfsCreateFile(), NtfsDeleteFileRecord(), NtfsDirFindFile(), NtfsFindMftRecord(), NtfsGetFileSize(), NtfsGetVolumeData(), NtfsGrowFileForWrite(), NtfsIsDirectoryEmpty(), NtfsLoadVolumeBitmap(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsReadUpCaseTable(), NtfsResizeAllocation(), NtfsSetEndOfFile(), NtfsTrimAllocation(), NtfsWriteFile(), tinyxml2::XMLElement::QueryBoolAttribute(), tinyxml2::XMLElement::QueryDoubleAttribute(), tinyxml2::XMLElement::QueryFloatAttribute(), tinyxml2::XMLElement::QueryIntAttribute(), tinyxml2::XMLElement::QueryUnsignedAttribute(), RemoveFilenameFromDirectoryWorker(), UpdateFileNameRecordWorker(), UpdateIndexAllocation(), UpdateIndexEntryFileName(), UpdateMftMirror(), and WriteAttributeFromIrp().
| NTSTATUS FixupUpdateSequenceArray | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_RECORD_HEADER | Record | ||
| ) |
Definition at line 2425 of file mft.c.
Referenced by BrowseSubNodeIndexEntries(), CreateBTreeNodeFromIndexNode(), NtfsIndexNodeIsEmpty(), PrintAllVCNs(), ReadFileRecord(), UpdateFileRecord(), and UpdateIndexEntryFileName().
| NTSTATUS FreeMftEntry | ( | PDEVICE_EXTENSION | DeviceExt, |
| ULONGLONG | MftIndex | ||
| ) |
Definition at line 3336 of file mft.c.
Referenced by NtfsDeleteFileRecord().
|
static |
Definition at line 2642 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), and RemoveFilenameFromDirectoryWorker().
| NTSTATUS IncreaseMftSize | ( | PDEVICE_EXTENSION | Vcb, |
| BOOLEAN | CanWait | ||
| ) |
Definition at line 293 of file mft.c.
Referenced by AddNewMftEntry().
| NTSTATUS InternalSetResidentAttributeLength | ( | PDEVICE_EXTENSION | DeviceExt, |
| PNTFS_ATTR_CONTEXT | AttrContext, | ||
| PFILE_RECORD_HEADER | FileRecord, | ||
| ULONG | AttrOffset, | ||
| ULONG | DataSize | ||
| ) |
Definition at line 542 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), RemoveFilenameFromDirectoryWorker(), and SetResidentAttributeDataLength().
| PNTFS_ATTR_RECORD MoveAttributes | ( | PDEVICE_EXTENSION | DeviceExt, |
| PNTFS_ATTR_RECORD | FirstAttributeToMove, | ||
| ULONG | FirstAttributeOffset, | ||
| ULONG_PTR | MoveTo | ||
| ) |
Definition at line 512 of file mft.c.
Referenced by AddRun(), and InternalSetResidentAttributeLength().
| NTSTATUS NtfsAddFilenameToDirectory | ( | PDEVICE_EXTENSION | DeviceExt, |
| ULONGLONG | DirectoryMftIndex, | ||
| ULONGLONG | FileReferenceNumber, | ||
| PFILENAME_ATTRIBUTE | FilenameAttribute, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 3049 of file mft.c.
Referenced by NtfsCommitRename(), NtfsCreateDirectory(), NtfsCreateFileRecord(), and NtfsRelinkFileNames().
| NTSTATUS NtfsDeleteFileRecord | ( | PDEVICE_EXTENSION | DeviceExt, |
| ULONGLONG | MftIndex, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 3470 of file mft.c.
Referenced by NtfsCleanupFile(), and NtfsClearRenameTarget().
Definition at line 4305 of file mft.c.
| VOID NtfsDumpFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
| PFILE_RECORD_HEADER | FileRecord | ||
| ) |
Definition at line 4342 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), NtfsCreateDirectory(), and NtfsCreateFileRecord().
| NTSTATUS NtfsExtendAllocation | ( | _In_ PDEVICE_EXTENSION | Vcb, |
| _In_ PNTFS_ATTR_CONTEXT | AttrContext, | ||
| _In_ ULONG | AttrOffset, | ||
| _In_ PFILE_RECORD_HEADER | FileRecord, | ||
| _In_ ULONGLONG | AllocationSize | ||
| ) |
Definition at line 753 of file mft.c.
Referenced by NtfsGrowStream(), NtfsResizeAllocation(), and SetNonResidentAttributeDataLength().
| NTSTATUS NtfsFindFileAt | ( | PDEVICE_EXTENSION | Vcb, |
| PUNICODE_STRING | SearchPattern, | ||
| PULONG | FirstEntry, | ||
| PFILE_RECORD_HEADER * | FileRecord, | ||
| PULONGLONG | MFTIndex, | ||
| ULONGLONG | CurrentMFTIndex, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 4363 of file mft.c.
Referenced by NtfsQueryDirectory().
| NTSTATUS NtfsFindMftRecord | ( | PDEVICE_EXTENSION | Vcb, |
| ULONGLONG | MFTIndex, | ||
| PUNICODE_STRING | FileName, | ||
| PULONG | FirstEntry, | ||
| BOOLEAN | DirSearch, | ||
| BOOLEAN | CaseSensitive, | ||
| ULONGLONG * | OutMFTIndex | ||
| ) |
Definition at line 4151 of file mft.c.
Referenced by NtfsFindFileAt(), and NtfsLookupFileAt().
|
static |
Definition at line 4491 of file mft.c.
Referenced by NtfsIndexNodeIsEmpty(), and NtfsIsDirectoryEmpty().
|
static |
Definition at line 4430 of file mft.c.
Referenced by NtfsIndexEntriesAreEmpty().
| NTSTATUS NtfsIsDirectoryEmpty | ( | _In_ PDEVICE_EXTENSION | Vcb, |
| _In_ ULONGLONG | MftIndex, | ||
| _Out_ PBOOLEAN | Empty | ||
| ) |
Definition at line 4554 of file mft.c.
Referenced by NtfsCleanupFile(), and NtfsSetDispositionInformation().
| NTSTATUS NtfsLoadUpCaseTable | ( | PDEVICE_EXTENSION | Vcb | ) |
| NTSTATUS NtfsLookupFile | ( | PDEVICE_EXTENSION | Vcb, |
| PUNICODE_STRING | PathName, | ||
| BOOLEAN | CaseSensitive, | ||
| PFILE_RECORD_HEADER * | FileRecord, | ||
| PULONGLONG | MFTIndex | ||
| ) |
Definition at line 4295 of file mft.c.
| NTSTATUS NtfsLookupFileAt | ( | PDEVICE_EXTENSION | Vcb, |
| PUNICODE_STRING | PathName, | ||
| BOOLEAN | CaseSensitive, | ||
| PFILE_RECORD_HEADER * | FileRecord, | ||
| PULONGLONG | MFTIndex, | ||
| ULONGLONG | CurrentMFTIndex | ||
| ) |
Definition at line 4236 of file mft.c.
Referenced by NtfsDirFindFile(), and NtfsLookupFile().
|
static |
Definition at line 1362 of file mft.c.
Referenced by ReadAttributeToIrp(), and WriteAttributeFromIrp().
|
static |
Definition at line 1866 of file mft.c.
Referenced by NtfsLoadUpCaseTable().
| NTSTATUS NtfsRemoveFilenameFromDirectory | ( | PDEVICE_EXTENSION | DeviceExt, |
| ULONGLONG | DirectoryMftIndex, | ||
| PFILENAME_ATTRIBUTE | FilenameAttribute, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 3297 of file mft.c.
Referenced by NtfsDeleteFileRecord(), and NtfsUnlinkFileNames().
| NTSTATUS NtfsResizeAllocation | ( | _In_ PNTFS_FCB | Fcb, |
| _In_ PFILE_OBJECT | FileObject, | ||
| _In_ BOOLEAN | CaseSensitive, | ||
| _In_ ULONGLONG | AllocationSize | ||
| ) |
Definition at line 924 of file mft.c.
Referenced by NtfsSetAllocationInformation().
Definition at line 842 of file mft.c.
Referenced by NtfsCleanupFile().
| NTSTATUS NtfsUpdateDuplicatedInformation | ( | PDEVICE_EXTENSION | Vcb, |
| PFILE_RECORD_HEADER | FileRecord, | ||
| ULONGLONG | MFTIndex, | ||
| ULONG | Flags, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 1995 of file mft.c.
Referenced by NtfsGrowStream(), NtfsResizeAllocation(), NtfsSetBasicInformation(), and NtfsSetEndOfFile().
| PNTFS_ATTR_CONTEXT PrepareAttributeContext | ( | PNTFS_ATTR_RECORD | AttrRecord | ) |
Definition at line 41 of file mft.c.
Referenced by FindAttribute(), and InternalReadNonResidentAttributes().
| ULONG ReadAttribute | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | Context, | ||
| ULONGLONG | Offset, | ||
| PCHAR | Buffer, | ||
| ULONG | Length | ||
| ) |
Definition at line 1625 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), BrowseSubNodeIndexEntries(), CreateBTreeNodeFromIndexNode(), FreeMftEntry(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsFindMftRecord(), NtfsIndexNodeIsEmpty(), NtfsIsDirectoryEmpty(), NtfsLoadVolumeBitmap(), NtfsReadFCBAttribute(), NtfsReadUpCaseTable(), PrintAllVCNs(), ReadFileRecord(), RemoveFilenameFromDirectoryWorker(), SetResidentAttributeDataLength(), UpdateFileNameRecordWorker(), UpdateIndexEntryFileName(), and UpdateMftMirror().
| ULONG ReadAttributeToIrp | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | Context, | ||
| ULONGLONG | Offset, | ||
| PCHAR | Buffer, | ||
| ULONG | Length, | ||
| PIRP | Irp | ||
| ) |
Definition at line 1556 of file mft.c.
Referenced by NtfsReadFile(), and ReadAttribute().
| NTSTATUS ReadFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
| ULONGLONG | index, | ||
| PFILE_RECORD_HEADER | file | ||
| ) |
Definition at line 1936 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), FindAttribute(), FreeMftEntry(), GetNtfsFileRecord(), NtfsBuildRenamedFileName(), NtfsClearRenameTarget(), NtfsCreateFile(), NtfsDeleteFileRecord(), NtfsFindFileAt(), NtfsFindMftRecord(), NtfsGetDotEntry(), NtfsGetParentMftIndex(), NtfsGetStreamInformation(), NtfsGetVolumeData(), NtfsGrowFileForWrite(), NtfsIsDirectoryEmpty(), NtfsLoadVolumeBitmap(), NtfsLookupFileAt(), NtfsMakeRootFCB(), NtfsMoonWalkID(), NtfsOpenFileById(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsReadUpCaseTable(), NtfsResizeAllocation(), NtfsSetBasicInformation(), NtfsSetEndOfFile(), NtfsSetRenameInformation(), NtfsTrimAllocation(), NtfsWriteFile(), RemoveFilenameFromDirectoryWorker(), UpdateFileNameRecordWorker(), UpdateMftMirror(), and WriteAttributeFromIrp().
| NTSTATUS ReadLCN | ( | PDEVICE_EXTENSION | Vcb, |
| ULONGLONG | lcn, | ||
| ULONG | count, | ||
| PVOID | buffer | ||
| ) |
Definition at line 3603 of file mft.c.
| VOID ReleaseAttributeContext | ( | PNTFS_ATTR_CONTEXT | Context | ) |
Definition at line 104 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), CreateBTreeFromIndex(), FreeMftEntry(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsCreateFile(), NtfsDeleteFileRecord(), NtfsDirFindFile(), NtfsFindMftRecord(), NtfsFreeVolumeBitmap(), NtfsGetFileSize(), NtfsGetVolumeData(), NtfsGrowFileForWrite(), NtfsIsDirectoryEmpty(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsReadUpCaseTable(), NtfsResizeAllocation(), NtfsSetEndOfFile(), NtfsTrimAllocation(), NtfsWriteFile(), RemoveFilenameFromDirectoryWorker(), UpdateFileNameRecordWorker(), UpdateIndexAllocation(), UpdateIndexEntryFileName(), UpdateMftMirror(), and WriteAttributeFromIrp().
|
static |
Definition at line 3096 of file mft.c.
Referenced by NtfsRemoveFilenameFromDirectory().
| NTSTATUS SetAttributeDataLength | ( | PFILE_OBJECT | FileObject, |
| PNTFS_FCB | Fcb, | ||
| PNTFS_ATTR_CONTEXT | AttrContext, | ||
| ULONG | AttrOffset, | ||
| PFILE_RECORD_HEADER | FileRecord, | ||
| PLARGE_INTEGER | DataSize | ||
| ) |
@parameter FileRecord Pointer to a file record. Must be a full record at least Fcb->Vcb->NtfsInfo.BytesPerFileRecord bytes large, not just the header.
Definition at line 615 of file mft.c.
Referenced by NtfsCreateFile(), NtfsGrowStream(), and NtfsSetEndOfFile().
| VOID SetFileRecordEnd | ( | PFILE_RECORD_HEADER | FileRecord, |
| PNTFS_ATTR_RECORD | AttrEnd, | ||
| ULONG | EndMarker | ||
| ) |
Definition at line 706 of file mft.c.
Referenced by AddBitmap(), AddData(), AddFileName(), AddIndexAllocation(), AddIndexRoot(), AddRun(), AddStandardInformation(), FreeClusters(), InternalSetResidentAttributeLength(), NtfsSetFileNameAttribute(), and SetResidentAttributeDataLength().
| NTSTATUS SetNonResidentAttributeDataLength | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | AttrContext, | ||
| ULONG | AttrOffset, | ||
| PFILE_RECORD_HEADER | FileRecord, | ||
| PLARGE_INTEGER | DataSize | ||
| ) |
Definition at line 1065 of file mft.c.
Referenced by AllocateIndexNode(), IncreaseMftSize(), SetAttributeDataLength(), and SetResidentAttributeDataLength().
| NTSTATUS SetResidentAttributeDataLength | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | AttrContext, | ||
| ULONG | AttrOffset, | ||
| PFILE_RECORD_HEADER | FileRecord, | ||
| PLARGE_INTEGER | DataSize | ||
| ) |
Definition at line 1148 of file mft.c.
Referenced by AllocateIndexNode(), IncreaseMftSize(), and SetAttributeDataLength().
| NTSTATUS UpdateFileNameRecord | ( | PDEVICE_EXTENSION | Vcb, |
| ULONGLONG | ParentMFTIndex, | ||
| PUNICODE_STRING | FileName, | ||
| BOOLEAN | DirSearch, | ||
| PNTFS_FILENAME_UPDATE | Update, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Definition at line 2191 of file mft.c.
Referenced by NtfsUpdateDuplicatedInformation().
|
static |
Searches a file's parent directory (given the parent's index in the mft) for the given file. Upon finding an index entry for that file, refreshes the fields of that entry's $FILE_NAME attribute named by Update->Flags.
(Most of this code was copied from NtfsFindMftRecord)
Definition at line 2082 of file mft.c.
Referenced by UpdateFileNameRecord().
| NTSTATUS UpdateFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
| ULONGLONG | MftIndex, | ||
| PFILE_RECORD_HEADER | FileRecord | ||
| ) |
Definition at line 2391 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AddRun(), AllocateIndexNode(), FreeClusters(), FreeMftEntry(), IncreaseMftSize(), NtfsCommitRename(), NtfsResizeAllocation(), NtfsTrimAllocation(), NtfsUpdateDuplicatedInformation(), RemoveFilenameFromDirectoryWorker(), SetAttributeDataLength(), SetResidentAttributeDataLength(), and WriteAttributeFromIrp().
| NTSTATUS UpdateIndexEntryFileName | ( | PDEVICE_EXTENSION | Vcb, |
| PFILE_RECORD_HEADER | MftRecord, | ||
| PCHAR | IndexRecord, | ||
| ULONG | IndexBlockSize, | ||
| PINDEX_ENTRY_ATTRIBUTE | FirstEntry, | ||
| PINDEX_ENTRY_ATTRIBUTE | LastEntry, | ||
| PUNICODE_STRING | FileName, | ||
| PULONG | StartEntry, | ||
| PULONG | CurrentEntry, | ||
| BOOLEAN | DirSearch, | ||
| PNTFS_FILENAME_UPDATE | Update, | ||
| BOOLEAN | CaseSensitive | ||
| ) |
Recursively searches a directory index and applies the requested update to the $FILE_NAME attribute of the proper index entry. (Heavily based on BrowseIndexEntries)
Definition at line 2215 of file mft.c.
Referenced by UpdateFileNameRecordWorker(), and UpdateIndexEntryFileName().
Definition at line 3690 of file mft.c.
Referenced by IncreaseMftSize().
| NTSTATUS WriteAttribute | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | Context, | ||
| ULONGLONG | Offset, | ||
| const PUCHAR | Buffer, | ||
| ULONG | Length, | ||
| PULONG | RealLengthWritten, | ||
| PFILE_RECORD_HEADER | FileRecord | ||
| ) |
Definition at line 1829 of file mft.c.
Referenced by AddFilenameToDirectoryWorker(), AddNewMftEntry(), AllocateIndexNode(), FreeMftEntry(), IncreaseMftSize(), NtfsWriteVolumeBitmap(), RemoveFilenameFromDirectoryWorker(), SetResidentAttributeDataLength(), UpdateFileNameRecordWorker(), UpdateFileRecord(), UpdateIndexEntryFileName(), UpdateIndexNode(), and UpdateMftMirror().
| NTSTATUS WriteAttributeFromIrp | ( | PDEVICE_EXTENSION | Vcb, |
| PNTFS_ATTR_CONTEXT | Context, | ||
| ULONGLONG | Offset, | ||
| const PUCHAR | Buffer, | ||
| ULONG | Length, | ||
| PULONG | RealLengthWritten, | ||
| PFILE_RECORD_HEADER | FileRecord, | ||
| PIRP | Irp | ||
| ) |
Definition at line 1677 of file mft.c.
Referenced by NtfsWriteFile(), and WriteAttribute().