mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[FASTFAT]
- Revert r54731 svn path=/trunk/; revision=54738
This commit is contained in:
@@ -558,6 +558,17 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
|
||||
Fcb = IrpContext->FileObject->FsContext;
|
||||
ASSERT(Fcb);
|
||||
|
||||
if (Fcb->Flags & FCB_IS_PAGE_FILE)
|
||||
{
|
||||
PFATINFO FatInfo = &IrpContext->DeviceExt->FatInfo;
|
||||
IrpContext->Stack->Parameters.Read.ByteOffset.QuadPart += FatInfo->dataStart * FatInfo->BytesPerSector;
|
||||
IoSkipCurrentIrpStackLocation(IrpContext->Irp);
|
||||
DPRINT("Read from page file, disk offset %I64x\n", IrpContext->Stack->Parameters.Read.ByteOffset.QuadPart);
|
||||
Status = IoCallDriver(IrpContext->DeviceExt->StorageDevice, IrpContext->Irp);
|
||||
VfatFreeIrpContext(IrpContext);
|
||||
return Status;
|
||||
}
|
||||
|
||||
DPRINT("<%wZ>\n", &Fcb->PathNameU);
|
||||
|
||||
ByteOffset = IrpContext->Stack->Parameters.Read.ByteOffset;
|
||||
@@ -760,6 +771,17 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
|
||||
Fcb = IrpContext->FileObject->FsContext;
|
||||
ASSERT(Fcb);
|
||||
|
||||
if (Fcb->Flags & FCB_IS_PAGE_FILE)
|
||||
{
|
||||
PFATINFO FatInfo = &IrpContext->DeviceExt->FatInfo;
|
||||
IrpContext->Stack->Parameters.Write.ByteOffset.QuadPart += FatInfo->dataStart * FatInfo->BytesPerSector;
|
||||
IoSkipCurrentIrpStackLocation(IrpContext->Irp);
|
||||
DPRINT("Write to page file, disk offset %I64x\n", IrpContext->Stack->Parameters.Write.ByteOffset.QuadPart);
|
||||
Status = IoCallDriver(IrpContext->DeviceExt->StorageDevice, IrpContext->Irp);
|
||||
VfatFreeIrpContext(IrpContext);
|
||||
return Status;
|
||||
}
|
||||
|
||||
DPRINT("<%wZ>\n", &Fcb->PathNameU);
|
||||
|
||||
/* fail if file is a directory and no paged read */
|
||||
|
||||
Reference in New Issue
Block a user