Author: cgutman
Date: Fri Dec 23 15:56:25 2011
New Revision: 54738
URL:
http://svn.reactos.org/svn/reactos?rev=54738&view=rev
Log:
[FASTFAT]
- Revert r54731
Modified:
trunk/reactos/drivers/filesystems/fastfat/rw.c
Modified: trunk/reactos/drivers/filesystems/fastfat/rw.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/rw.c [iso-8859-1] Fri Dec 23 15:56:25 2011
@@ -558,6 +558,17 @@
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;
@@ -759,6 +770,17 @@
ASSERT(IrpContext->FileObject);
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);