[NTFS]
[reactos.git] / reactos / drivers / filesystems / ntfs / mft.c
index 2b94e22..f91e67b 100644 (file)
@@ -105,9 +105,6 @@ FindAttributeHelper(PDEVICE_EXTENSION Vcb,
             PNTFS_ATTR_RECORD ListAttrRecord;
             PNTFS_ATTR_RECORD ListAttrRecordEnd;
 
-            // Do not handle non-resident yet
-            ASSERT(!(AttrRecord->IsNonResident & 1));
-
             ListContext = PrepareAttributeContext(AttrRecord);
 
             ListSize = AttributeDataLength(&ListContext->Record);
@@ -135,7 +132,7 @@ FindAttributeHelper(PDEVICE_EXTENSION Vcb,
 
                 if (Context != NULL)
                 {
-                    DPRINT("Found context = %p\n", Context);
+                    if (AttrRecord->IsNonResident) DPRINT("Found context = %p\n", Context);
                     return Context;
                 }
             }
@@ -310,6 +307,7 @@ ReadAttribute(PDEVICE_EXTENSION Vcb,
     Status = NtfsReadDisk(Vcb->StorageDevice,
                           DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster + Offset - CurrentOffset,
                           ReadLength,
+                          Vcb->NtfsInfo.BytesPerSector,
                           (PVOID)Buffer,
                           FALSE);
     if (NT_SUCCESS(Status))
@@ -344,6 +342,7 @@ ReadAttribute(PDEVICE_EXTENSION Vcb,
                 Status = NtfsReadDisk(Vcb->StorageDevice,
                                       DataRunStartLCN * Vcb->NtfsInfo.BytesPerCluster,
                                       ReadLength,
+                                      Vcb->NtfsInfo.BytesPerSector,
                                       (PVOID)Buffer,
                                       FALSE);
                 if (!NT_SUCCESS(Status))