Author: pschweitzer
Date: Sat Nov 29 20:26:07 2014
New Revision: 65527

URL: http://svn.reactos.org/svn/reactos?rev=65527&view=rev
Log:
[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.

Modified:
    trunk/reactos/drivers/filesystems/fastfat/cleanup.c
    trunk/reactos/drivers/filesystems/fastfat/close.c
    trunk/reactos/drivers/filesystems/fastfat/fsctl.c
    trunk/reactos/drivers/filesystems/fastfat/vfat.h

Modified: trunk/reactos/drivers/filesystems/fastfat/cleanup.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/cleanup.c?rev=65527&r1=65526&r2=65527&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Sat Nov 29 
20:26:07 2014
@@ -110,10 +110,12 @@
         ExReleaseResourceLite(&pFcb->MainResource);
     }
 
+#ifdef ENABLE_SWAPOUT
     if (DeviceExt->Flags & VCB_DISMOUNT_PENDING)
     {
         VfatCheckForDismount(DeviceExt, FALSE);
     }
+#endif
 
     return STATUS_SUCCESS;
 }

Modified: trunk/reactos/drivers/filesystems/fastfat/close.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/close.c?rev=65527&r1=65526&r2=65527&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/close.c   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/close.c   [iso-8859-1] Sat Nov 29 
20:26:07 2014
@@ -82,10 +82,12 @@
         vfatDestroyCCB(pCcb);
     }
 
+#ifdef ENABLE_SWAPOUT
     if (DeviceExt->OpenHandleCount == 0)
     {
         VfatCheckForDismount(DeviceExt, FALSE);
     }
+#endif
 
     return Status;
 }

Modified: trunk/reactos/drivers/filesystems/fastfat/fsctl.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/fsctl.c?rev=65527&r1=65526&r2=65527&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/fsctl.c   [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/fsctl.c   [iso-8859-1] Sat Nov 29 
20:26:07 2014
@@ -977,6 +977,9 @@
 
     /* Mark we're being dismounted */
     DeviceExt->Flags |= VCB_DISMOUNT_PENDING;
+#ifndef ENABLE_SWAPOUT
+    IrpContext->DeviceObject->Vpb->Flags &= ~VPB_MOUNTED;
+#endif
 
     ExReleaseResourceLite(&DeviceExt->FatResource);
 

Modified: trunk/reactos/drivers/filesystems/fastfat/vfat.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfat/vfat.h?rev=65527&r1=65526&r2=65527&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/vfat.h    [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/vfat.h    [iso-8859-1] Sat Nov 29 
20:26:07 2014
@@ -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))


Reply via email to