[FASTFAT]

- Revert r54731

svn path=/trunk/; revision=54738
This commit is contained in:
Cameron Gutman 2011-12-23 15:56:25 +00:00
parent 3a31942276
commit 4d1949f841

View file

@ -558,6 +558,17 @@ VfatRead(PVFAT_IRP_CONTEXT IrpContext)
Fcb = IrpContext->FileObject->FsContext; Fcb = IrpContext->FileObject->FsContext;
ASSERT(Fcb); 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); DPRINT("<%wZ>\n", &Fcb->PathNameU);
ByteOffset = IrpContext->Stack->Parameters.Read.ByteOffset; ByteOffset = IrpContext->Stack->Parameters.Read.ByteOffset;
@ -760,6 +771,17 @@ NTSTATUS VfatWrite (PVFAT_IRP_CONTEXT IrpContext)
Fcb = IrpContext->FileObject->FsContext; Fcb = IrpContext->FileObject->FsContext;
ASSERT(Fcb); 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); DPRINT("<%wZ>\n", &Fcb->PathNameU);
/* fail if file is a directory and no paged read */ /* fail if file is a directory and no paged read */