ReactOS 0.4.16-dev-329-g9223134
|
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) | ||||||||||||||
SetNonResidentAttributeDataLength | |||||||||||||||
@implemented Called by SetAttributeDataLength() 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) | ||||||||||||||
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 | WriteAttribute (PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, const PUCHAR Buffer, ULONG Length, PULONG RealLengthWritten, PFILE_RECORD_HEADER FileRecord) | ||||||||||||||
NTSTATUS | ReadFileRecord (PDEVICE_EXTENSION Vcb, ULONGLONG index, PFILE_RECORD_HEADER file) | ||||||||||||||
NTSTATUS | UpdateFileNameRecord (PDEVICE_EXTENSION Vcb, ULONGLONG ParentMFTIndex, PUNICODE_STRING FileName, BOOLEAN DirSearch, ULONGLONG NewDataSize, ULONGLONG NewAllocationSize, BOOLEAN CaseSensitive) | ||||||||||||||
NTSTATUS | UpdateIndexEntryFileNameSize (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, ULONGLONG NewDataSize, ULONGLONG NewAllocatedSize, 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) | ||||||||||||||
NtfsAddFilenameToDirectory | |||||||||||||||
@implemented Adds a $FILE_NAME attribute to a given directory index.
| |||||||||||||||
NTSTATUS | NtfsAddFilenameToDirectory (PDEVICE_EXTENSION DeviceExt, ULONGLONG DirectoryMftIndex, ULONGLONG FileReferenceNumber, PFILENAME_ATTRIBUTE FilenameAttribute, BOOLEAN CaseSensitive) | ||||||||||||||
NTSTATUS | AddFixupArray (PDEVICE_EXTENSION Vcb, PNTFS_RECORD_HEADER Record) | ||||||||||||||
NTSTATUS | ReadLCN (PDEVICE_EXTENSION Vcb, ULONGLONG lcn, ULONG count, PVOID buffer) | ||||||||||||||
BOOLEAN | CompareFileName (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) | ||||||||||||||
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.
| |||||||||||||||
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) | ||||||||||||||
NTSTATUS AddFixupArray | ( | PDEVICE_EXTENSION | Vcb, |
PNTFS_RECORD_HEADER | Record | ||
) |
Definition at line 2603 of file mft.c.
Referenced by CreateIndexBufferFromBTreeNode(), UpdateFileRecord(), and UpdateIndexEntryFileNameSize().
NTSTATUS AddNewMftEntry | ( | PFILE_RECORD_HEADER | FileRecord, |
PDEVICE_EXTENSION | DeviceExt, | ||
PULONGLONG | DestinationIndex, | ||
BOOLEAN | CanWait | ||
) |
Definition at line 2022 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(), NtfsReadFile(), NtfsSetEndOfFile(), and NtfsWriteFile().
ULONGLONG AttributeDataLength | ( | PNTFS_ATTR_RECORD | AttrRecord | ) |
Definition at line 259 of file mft.c.
Referenced by AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), FreeClusters(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsGetFileSize(), NtfsGetFreeClusters(), NtfsGetStreamInformation(), NtfsGetVolumeData(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsSetEndOfFile(), NtfsWriteFile(), PrintAllVCNs(), SetAttributeDataLength(), UpdateFileNameRecord(), UpdateIndexEntryFileNameSize(), 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 2984 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 2839 of file mft.c.
Referenced by BrowseIndexEntries(), and BrowseSubNodeIndexEntries().
BOOLEAN CompareFileName | ( | PUNICODE_STRING | FileName, |
PINDEX_ENTRY_ATTRIBUTE | IndexEntry, | ||
BOOLEAN | DirSearch, | ||
BOOLEAN | CaseSensitive | ||
) |
Definition at line 2650 of file mft.c.
Referenced by BrowseIndexEntries(), BrowseSubNodeIndexEntries(), and UpdateIndexEntryFileNameSize().
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 AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), CreateBTreeFromIndex(), tinyxml2::XMLElement::FindAttribute(), FindAttribute(), FreeClusters(), GetVolumeBitmap(), IncreaseMftSize(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsCreateFile(), NtfsDirFindFile(), NtfsFindMftRecord(), NtfsGetFileSize(), NtfsGetFreeClusters(), NtfsGetVolumeData(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsSetEndOfFile(), NtfsWriteFile(), tinyxml2::XMLElement::QueryBoolAttribute(), tinyxml2::XMLElement::QueryDoubleAttribute(), tinyxml2::XMLElement::QueryFloatAttribute(), tinyxml2::XMLElement::QueryIntAttribute(), tinyxml2::XMLElement::QueryUnsignedAttribute(), UpdateFileNameRecord(), UpdateIndexAllocation(), UpdateIndexEntryFileNameSize(), UpdateMftMirror(), and WriteAttribute().
NTSTATUS FixupUpdateSequenceArray | ( | PDEVICE_EXTENSION | Vcb, |
PNTFS_RECORD_HEADER | Record | ||
) |
Definition at line 1965 of file mft.c.
Referenced by BrowseSubNodeIndexEntries(), CreateBTreeNodeFromIndexNode(), PrintAllVCNs(), ReadFileRecord(), UpdateFileRecord(), and UpdateIndexEntryFileNameSize().
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 NtfsAddFilenameToDirectory(), 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 2192 of file mft.c.
Referenced by NtfsCreateDirectory(), and NtfsCreateFileRecord().
Definition at line 3297 of file mft.c.
VOID NtfsDumpFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
PFILE_RECORD_HEADER | FileRecord | ||
) |
Definition at line 3334 of file mft.c.
Referenced by NtfsAddFilenameToDirectory(), NtfsCreateDirectory(), and NtfsCreateFileRecord().
NTSTATUS NtfsFindFileAt | ( | PDEVICE_EXTENSION | Vcb, |
PUNICODE_STRING | SearchPattern, | ||
PULONG | FirstEntry, | ||
PFILE_RECORD_HEADER * | FileRecord, | ||
PULONGLONG | MFTIndex, | ||
ULONGLONG | CurrentMFTIndex, | ||
BOOLEAN | CaseSensitive | ||
) |
Definition at line 3355 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 3146 of file mft.c.
Referenced by NtfsFindFileAt(), and NtfsLookupFileAt().
NTSTATUS NtfsLookupFile | ( | PDEVICE_EXTENSION | Vcb, |
PUNICODE_STRING | PathName, | ||
BOOLEAN | CaseSensitive, | ||
PFILE_RECORD_HEADER * | FileRecord, | ||
PULONGLONG | MFTIndex | ||
) |
Definition at line 3287 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 3229 of file mft.c.
Referenced by NtfsDirFindFile(), and NtfsLookupFile().
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 1065 of file mft.c.
Referenced by AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), BrowseSubNodeIndexEntries(), CreateBTreeNodeFromIndexNode(), FreeClusters(), GetVolumeBitmap(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsFindMftRecord(), NtfsGetFreeClusters(), NtfsReadFCBAttribute(), NtfsReadFile(), PrintAllVCNs(), ReadFileRecord(), SetResidentAttributeDataLength(), UpdateFileNameRecord(), UpdateIndexEntryFileNameSize(), and UpdateMftMirror().
NTSTATUS ReadFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
ULONGLONG | index, | ||
PFILE_RECORD_HEADER | file | ||
) |
Definition at line 1631 of file mft.c.
Referenced by FindAttribute(), FreeClusters(), GetNtfsFileRecord(), GetVolumeBitmap(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsCreateFile(), NtfsFindFileAt(), NtfsFindMftRecord(), NtfsGetFreeClusters(), NtfsGetStreamInformation(), NtfsGetVolumeData(), NtfsLookupFileAt(), NtfsMakeRootFCB(), NtfsMoonWalkID(), NtfsOpenFileById(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsSetEndOfFile(), NtfsWriteFile(), UpdateFileNameRecord(), UpdateMftMirror(), and WriteAttribute().
NTSTATUS ReadLCN | ( | PDEVICE_EXTENSION | Vcb, |
ULONGLONG | lcn, | ||
ULONG | count, | ||
PVOID | buffer | ||
) |
Definition at line 2631 of file mft.c.
VOID ReleaseAttributeContext | ( | PNTFS_ATTR_CONTEXT | Context | ) |
Definition at line 104 of file mft.c.
Referenced by AddNewMftEntry(), AllocateIndexNode(), BrowseIndexEntries(), CreateBTreeFromIndex(), FreeClusters(), GetVolumeBitmap(), IncreaseMftSize(), InternalReadNonResidentAttributes(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsCreateFile(), NtfsDirFindFile(), NtfsFindMftRecord(), NtfsGetFileSize(), NtfsGetFreeClusters(), NtfsGetVolumeData(), NtfsReadFCBAttribute(), NtfsReadFile(), NtfsSetEndOfFile(), NtfsWriteFile(), UpdateFileNameRecord(), UpdateIndexAllocation(), UpdateIndexEntryFileNameSize(), UpdateMftMirror(), and WriteAttribute().
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(), NtfsSetEndOfFile(), and NtfsWriteFile().
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(), and SetResidentAttributeDataLength().
NTSTATUS SetNonResidentAttributeDataLength | ( | PDEVICE_EXTENSION | Vcb, |
PNTFS_ATTR_CONTEXT | AttrContext, | ||
ULONG | AttrOffset, | ||
PFILE_RECORD_HEADER | FileRecord, | ||
PLARGE_INTEGER | DataSize | ||
) |
Definition at line 756 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 891 of file mft.c.
Referenced by AllocateIndexNode(), IncreaseMftSize(), and SetAttributeDataLength().
NTSTATUS UpdateFileNameRecord | ( | PDEVICE_EXTENSION | Vcb, |
ULONGLONG | ParentMFTIndex, | ||
PUNICODE_STRING | FileName, | ||
BOOLEAN | DirSearch, | ||
ULONGLONG | NewDataSize, | ||
ULONGLONG | NewAllocationSize, | ||
BOOLEAN | CaseSensitive | ||
) |
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, updates Data Size and Allocated Size values in the $FILE_NAME attribute of that entry.
(Most of this code was copied from NtfsFindMftRecord)
Definition at line 1660 of file mft.c.
Referenced by NtfsSetEndOfFile(), and NtfsWriteFile().
NTSTATUS UpdateFileRecord | ( | PDEVICE_EXTENSION | Vcb, |
ULONGLONG | MftIndex, | ||
PFILE_RECORD_HEADER | FileRecord | ||
) |
Definition at line 1931 of file mft.c.
Referenced by AddNewMftEntry(), AddRun(), AllocateIndexNode(), FreeClusters(), IncreaseMftSize(), NtfsAddFilenameToDirectory(), SetAttributeDataLength(), SetResidentAttributeDataLength(), and WriteAttribute().
NTSTATUS UpdateIndexEntryFileNameSize | ( | 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, | ||
ULONGLONG | NewDataSize, | ||
ULONGLONG | NewAllocatedSize, | ||
BOOLEAN | CaseSensitive | ||
) |
Recursively searches directory index and applies the size update to the $FILE_NAME attribute of the proper index entry. (Heavily based on BrowseIndexEntries)
Definition at line 1770 of file mft.c.
Referenced by UpdateFileNameRecord(), and UpdateIndexEntryFileNameSize().
Definition at line 2714 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 1315 of file mft.c.
Referenced by AddNewMftEntry(), AllocateIndexNode(), FreeClusters(), IncreaseMftSize(), NtfsAddFilenameToDirectory(), NtfsAllocateClusters(), NtfsWriteFile(), SetResidentAttributeDataLength(), UpdateFileNameRecord(), UpdateFileRecord(), UpdateIndexEntryFileNameSize(), UpdateIndexNode(), and UpdateMftMirror().