mirror of
https://github.com/reactos/reactos.git
synced 2025-04-20 12:29:56 +00:00
[FASTFAT]
- Revert r54731 svn path=/trunk/; revision=54738
This commit is contained in:
parent
3a31942276
commit
4d1949f841
1 changed files with 22 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue