mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[FASTFAT]
- Add a flag to enable (or disable depends on your reading ;-)) the VPB swapout process for volume umount. - By default, disable it for MSVC builds. This *might* lolfix the MSVC builds. Just for the record, we also have a bug in the GCC builds but it doesn't seem to show up. The main issue is that after formatting, we close handle to the volume, and IRP_MJ_CLEANUP is properly received and initiates a bit of dismount. But then, the IRP_MJ_CLOSE is never received (why????) and thus, dismount cannot properly end. This is a real & serious issue. svn path=/trunk/; revision=65527
This commit is contained in:
parent
8d5e230523
commit
e85718fec8
4 changed files with 10 additions and 0 deletions
|
@ -110,10 +110,12 @@ VfatCleanupFile(
|
|||
ExReleaseResourceLite(&pFcb->MainResource);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SWAPOUT
|
||||
if (DeviceExt->Flags & VCB_DISMOUNT_PENDING)
|
||||
{
|
||||
VfatCheckForDismount(DeviceExt, FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -82,10 +82,12 @@ VfatCloseFile(
|
|||
vfatDestroyCCB(pCcb);
|
||||
}
|
||||
|
||||
#ifdef ENABLE_SWAPOUT
|
||||
if (DeviceExt->OpenHandleCount == 0)
|
||||
{
|
||||
VfatCheckForDismount(DeviceExt, FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
|
|
@ -977,6 +977,9 @@ VfatDismountVolume(
|
|||
|
||||
/* Mark we're being dismounted */
|
||||
DeviceExt->Flags |= VCB_DISMOUNT_PENDING;
|
||||
#ifndef ENABLE_SWAPOUT
|
||||
IrpContext->DeviceObject->Vpb->Flags &= ~VPB_MOUNTED;
|
||||
#endif
|
||||
|
||||
ExReleaseResourceLite(&DeviceExt->FatResource);
|
||||
|
||||
|
|
|
@ -7,6 +7,9 @@
|
|||
#include <pseh/pseh2.h>
|
||||
|
||||
#define USE_ROS_CC_AND_FS
|
||||
#ifndef _MSC_VER
|
||||
#define ENABLE_SWAPOUT
|
||||
#endif
|
||||
|
||||
#define ROUND_DOWN(n, align) \
|
||||
(((ULONG)n) & ~((align) - 1l))
|
||||
|
|
Loading…
Reference in a new issue