mirror of
https://github.com/reactos/reactos.git
synced 2025-08-02 17:56:06 +00:00
[NTFS] - Refactor to allow the copy of the attribute stored in NTFS_ATTR_CONTEXT to have a dynamic length; change Record member from an NTFS_ATTR_RECORD to a PNTFS_ATTR_RECORD. Rename it pRecord to reinforce the change. Fix some bugs related to the record size changing.
-PrepareAttributeContext() - update to allocate memory for pRecord. Don't assume allocations are succeeding. -ReleaseAttributeContext() - update to free memory for pRecord. -InternalSetResidentAttributeLength() - Increase size of AttrContext->pRecord as needed. Update to return an NTSTATUS. -SetResidentAttributeDataLength() - Fix bug that could occur when migrating resident attributes to non-resident if AttrContext->pRecord is too small for the new attribute. -AddRun() - Fix a bug by reallocating AttrContext->pRecord if the record needs to be enlarged. svn path=/branches/GSoC_2016/NTFS/; revision=75493
This commit is contained in:
parent
f2e47474f0
commit
4dfcd1d582
10 changed files with 216 additions and 120 deletions
|
@ -631,7 +631,7 @@ NtfsSetEndOfFile(PNTFS_FCB Fcb,
|
|||
}
|
||||
|
||||
// Get the size of the data attribute
|
||||
CurrentFileSize.QuadPart = AttributeDataLength(&DataContext->Record);
|
||||
CurrentFileSize.QuadPart = AttributeDataLength(DataContext->pRecord);
|
||||
|
||||
// Are we enlarging the attribute?
|
||||
if (NewFileSize->QuadPart > CurrentFileSize.QuadPart)
|
||||
|
@ -673,7 +673,7 @@ NtfsSetEndOfFile(PNTFS_FCB Fcb,
|
|||
FileName.Length = FileNameAttribute->NameLength * sizeof(WCHAR);
|
||||
FileName.MaximumLength = FileName.Length;
|
||||
|
||||
AllocationSize = AttributeAllocatedLength(&DataContext->Record);
|
||||
AllocationSize = AttributeAllocatedLength(DataContext->pRecord);
|
||||
|
||||
Status = UpdateFileNameRecord(Fcb->Vcb,
|
||||
ParentMFTId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue