201027_11
authorhgs
Wed, 21 Jul 2010 14:31:36 +0100
changeset 220 14267bc009a6
parent 202 9aca3be14c27
201027_11
halservices/hal/bld.inf
kernel/eka/common/mem.cpp
kernel/eka/common/win32/cmem.cpp
kernel/eka/include/cpudefs.h
kernel/eka/include/e32ver.h
kernel/eka/kernel/ekern.mmp
kernel/eka/release.txt
kernel/eka/rombuild/h4usbtest.iby
kerneltest/f32test/server/t_dspace.cpp
kerneltest/f32test/server/t_nmbs.cpp
package_map.xml
userlibandfileserver/fileserver/group/release.txt
userlibandfileserver/fileserver/inc/f32ver.h
userlibandfileserver/fileserver/sfile/sf_request.cpp
userlibandfileserver/fileserver/sfile/sf_std.h
--- a/halservices/hal/bld.inf	Mon Jul 12 14:24:01 2010 +0100
+++ b/halservices/hal/bld.inf	Wed Jul 21 14:31:36 2010 +0100
@@ -41,9 +41,6 @@
 rom/haltests.iby		/epoc32/rom/include/haltests.iby
 rom/haltests.auto.bat	/epoc32/rom/include/haltests.auto.bat
 
-rom/tshell_haltests.oby	 ../../kernel/eka/rombuild/tshell_haltests.oby
-
-
 
 PRJ_MMPFILES
 src/hal_lib
--- a/kernel/eka/common/mem.cpp	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/common/mem.cpp	Wed Jul 21 14:31:36 2010 +0100
@@ -26,6 +26,8 @@
 
 extern "C" {
 
+#ifndef __MEMMOVE_MACHINE_CODED__
+
 // See header file e32cmn.h for the in-source documentation.
 EXPORT_C TAny* memcpy(TAny* aTrg, const TAny* aSrc, unsigned int aLength)
 	{
@@ -74,7 +76,7 @@
 	return aTrg;
 	}
 
-
+#endif // ! __MEMMOVE_MACHINE_CODED__
 
 // See header file e32cmn.h for the in-source documentation.
 EXPORT_C TAny* memclr(TAny* aTrg, unsigned int aLength)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kernel/eka/common/win32/cmem.cpp	Wed Jul 21 14:31:36 2010 +0100
@@ -0,0 +1,142 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// e32\common\win32\cmem.cpp
+//
+//
+
+#include "common.h"
+
+#ifdef __MEMMOVE_MACHINE_CODED__
+
+extern "C" {
+
+// See header file e32cmn.h for the in-source documentation.
+EXPORT_C __NAKED__ TAny* memmove(TAny* , const TAny* , unsigned int)
+	{
+	_asm push      ebx							; // Save used registers
+	_asm push      esi
+	_asm push      edi
+	_asm push      ebp
+
+	_asm cmp       dword ptr [esp+0x1c],0x0		; // Is aLength == 0?
+	_asm mov       eax,dword ptr [esp+0x14]		; // Ptr to destination
+	_asm mov       ebx,dword ptr [esp+0x18]		; // Ptr to source
+	_asm je        End							; // aLength is 0, just return
+
+	_asm mov       ecx,eax						; // Copy destination
+	_asm xor       ebp,ebp						; // ebp = 0
+	_asm test      ecx,0x3						; // Dest word aligned?
+	_asm mov       edx,ebx						; // Copy ptr to source
+	_asm jne       Misaligned					; // No
+	_asm test      edx,0x3						; // Source word aligned?
+	_asm jne       Misaligned					; // No
+	_asm mov       ebp,dword ptr [esp+0x1c]		; // ebp = aLength
+	_asm shr       ebp,0x2						; // ebp = aLength in words
+
+Misaligned:
+
+	_asm lea       edx,dword ptr [ebp*4+0x0]	; // edx = aLength in words
+	_asm sal       ebp,0x2						; // ebp = aLength in bytes
+	_asm add       ebp,ecx						; // Point to end of destination
+	_asm mov       edi,dword ptr [esp+0x1c]		; // Get number of bytes to copy
+	_asm sub       edi,edx						; // Find remainder (aLength % 3)
+	_asm cmp       eax,ebx						; // Dest >= source?
+	_asm mov       edx,ebp						; // Ptr to end of destination
+	_asm jae       DoDescendingCopy				; // Yes, copy downwards
+
+	_asm jmp       AscendingCopy				; // No, copy upwards
+
+AscendingCopyLoop:
+
+	_asm mov       ebp,dword ptr [ebx]			; // Get a word
+	_asm mov       dword ptr [ecx],ebp			; // And store it
+	_asm add       ebx,0x4						; // Increment source by a word
+	_asm add       ecx,0x4						; // Increment destination by a word
+
+AscendingCopy:
+
+	_asm cmp       ecx,edx						; // Still data to copy?
+	_asm jb        AscendingCopyLoop			; // Yes
+
+	_asm mov       ebp,eax						; // Copy ptr to destination
+	_asm add       ebp,dword ptr [esp+0x1c]		; // Point to end of destination
+	_asm jmp       CopyRemainder				; // Copy left over (aLength % 3) bytes
+
+CopyRemainderLoop:
+
+	_asm movzx     edx,byte ptr [ebx]			; // Get a byte
+	_asm mov       byte ptr [ecx],dl			; // And store it
+	_asm inc       ebx							; // Increment source by a byte
+	_asm inc       ecx							; // Increment destination by a byte
+
+CopyRemainder:
+
+	_asm cmp       ecx,ebp						; // Any remaining bytes to copy?
+	_asm jb        CopyRemainderLoop			; // Yes, go do it
+
+	_asm jmp       End							; // All done
+
+DoDescendingCopy:
+
+	_asm cmp       eax,ebx						; // Still data to copy?
+	_asm jbe       End							; // No, all done
+
+	_asm lea       esi,dword ptr [edi+ebp]		; // Get ptr to end of destination
+	_asm mov       edi,ebx						; // Get ptr to source
+	_asm add       edi,dword ptr [esp+0x1c]		; // Point to end of source
+	_asm jmp       DescendingCopyRemainder		; // Copy copy some data
+
+DescendingCopyRemainderLoop:
+
+	_asm dec       edi							; // Decrement source by a byte
+	_asm dec       esi							; // Decrement dest by a byte
+	_asm movzx     ebx,byte ptr [edi]			; // Get a byte
+	_asm mov       byte ptr [esi],bl			; // And store it
+
+DescendingCopyRemainder:
+
+	_asm cmp       esi,ebp						; // Still data to copy?
+	_asm ja        DescendingCopyRemainderLoop	; // Yes, go do it
+
+	_asm jmp       DescendingCopy				; // Go copy the bulk of the data
+
+DescendingCopyLoop:
+
+	_asm sub       edi,0x4						; // Decrement source by a word
+	_asm sub       edx,0x4						; // Decrement dest by a word
+	_asm mov       ebx,dword ptr [edi]			; // Get a word
+	_asm mov       dword ptr [edx],ebx			; // And store it
+
+DescendingCopy:
+
+	_asm cmp       edx,ecx						; // Still data to copy
+	_asm ja        DescendingCopyLoop			; // Yes, go do it
+
+End:
+
+	_asm pop       ebp							; // Restore used registers
+	_asm pop       edi
+	_asm pop       esi
+	_asm pop       ebx
+	_asm ret
+	}
+
+// See header file e32cmn.h for the in-source documentation.
+EXPORT_C __NAKED__ TAny* memcpy(TAny* , const TAny* , unsigned int)
+	{
+	__asm jmp (memmove);						; // memmove() will perform the same function
+	}
+}
+
+#endif // defined(__MEMMOVE_MACHINE_CODED__)
--- a/kernel/eka/include/cpudefs.h	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/include/cpudefs.h	Wed Jul 21 14:31:36 2010 +0100
@@ -198,8 +198,9 @@
 
 #if defined(__WINS__)
 #define __NAKED__ __declspec( naked )
-#ifndef __MINIMUM_MACHINE_CODE__
-//#define __MEM_MACHINE_CODED__
+#if !defined(__MINIMUM_MACHINE_CODE__) && defined(__KERNEL_MODE__)
+// Assembly language memmove() and memcpy() are used for WINS but only in the kernel, not euser
+#define __MEMMOVE_MACHINE_CODED__
 #endif
 #define __CPU_X86
 #endif
--- a/kernel/eka/include/e32ver.h	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/include/e32ver.h	Wed Jul 21 14:31:36 2010 +0100
@@ -28,7 +28,7 @@
 
 const TInt KE32MajorVersionNumber=2;
 const TInt KE32MinorVersionNumber=0;
-const TInt KE32BuildVersionNumber=3107;
+const TInt KE32BuildVersionNumber=3108;
 
 const TInt KMachineConfigurationMajorVersionNumber=1;
 const TInt KMachineConfigurationMinorVersionNumber=0;
--- a/kernel/eka/kernel/ekern.mmp	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/kernel/ekern.mmp	Wed Jul 21 14:31:36 2010 +0100
@@ -135,6 +135,10 @@
 source					 ckernel.cpp csched.cpp
 source					 cutils.cpp cache.cpp
 
+sourcepath				../common/win32
+userinclude				../common
+source					cmem.cpp
+
 library					emulator.lib
 #endif
 
--- a/kernel/eka/release.txt	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/release.txt	Wed Jul 21 14:31:36 2010 +0100
@@ -1,3 +1,20 @@
+Version 2.00.3108
+=================
+(Made by famustaf 12/07/2010)
+
+1.	coliward
+	1.	ou1cimx1#457854 Kernel's memmove() routine needs optimising for Win32 UDEB builds
+
+2.	stmansfi
+	1.	ou1cimx1#468733 ENV Remove unnecessary test exports
+
+3.	jimhofe
+	1.	MINOR_CHANGE Adding pkgdefs file for mounting the filesystem from the synergy package
+
+4.	niccox
+	1.	ou1cimx1#474990 h4usbtest.iby is missing t_usb_transfersrv.dll
+
+
 Version 2.00.3107
 =================
 (Made by famustaf 07/07/2010)
--- a/kernel/eka/rombuild/h4usbtest.iby	Mon Jul 12 14:24:01 2010 +0100
+++ b/kernel/eka/rombuild/h4usbtest.iby	Wed Jul 21 14:31:36 2010 +0100
@@ -30,6 +30,7 @@
 file=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\t_usb_device.exe			sys\bin\t_usb_device.exe
 file=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\t_usb_scdevice.exe			sys\bin\t_usb_scdevice.exe
 file=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\t_usbcsc.exe				sys\bin\t_usbcsc.exe
+file=EPOCROOT##epoc32\release\##MAIN##\##BUILD##\t_usb_transfersrv.dll		sys\bin\t_usb_transfersrv.dll
 
 REM t_usb_device xml configuration files
 
--- a/kerneltest/f32test/server/t_dspace.cpp	Mon Jul 12 14:24:01 2010 +0100
+++ b/kerneltest/f32test/server/t_dspace.cpp	Wed Jul 21 14:31:36 2010 +0100
@@ -1697,6 +1697,102 @@
 
 	}
 
+//-------------------------------------------------------------------------------------------------
+// Test the fix for:
+// ou1cimx#410349 Not getting any Notification from RFs::NotifyDiskSpace() for E and F drive when when tested multiple
+// 
+// Action: Enable a plugin to intercept RFs::Delete, and test RFs::Delet can still trigger disk space
+// notification
+//-------------------------------------------------------------------------------------------------
+
+_LIT(KPreModifierPluginFileName,"premodifier_plugin");
+_LIT(KPreModifierPluginName,"PreModifierPlugin");
+const TUint KTestFileSize = KKilo * 100;
+
+#define SAFETEST_KErrNone(a)        if(a != KErrNone)\
+                                        {\
+                                        TheFs.DismountPlugin(KPreModifierPluginName);\
+                                        TheFs.RemovePlugin(KPreModifierPluginName);\
+                                        test_KErrNone(a);\
+                                        }
+
+TInt PluginTestThreadFunction(TAny*)
+    {
+    RTest test(_L("PluginTestThreadFunction"));
+    RFs fs;
+    fs.Connect();
+    
+    TInt r = fs.SetSessionPath(gSessionPath);
+    test_KErrNone(r);
+    
+    RFile file;
+    r = file.Create(fs, KTestFile1, EFileShareAny|EFileWrite);
+    test_KErrNone(r);
+    r = file.SetSize(KTestFileSize);
+    test_KErrNone(r);
+    file.Close();
+      
+    User::After(5000000); // wait for 5 seconds, to ensure first notification received.
+    
+    r = fs.Delete(KTestFile1);
+    test_KErrNone(r);
+    
+    fs.Close();
+    return KErrNone;
+    }
+
+void TestDiskSpaceNotifyWithPlugin()
+    {
+    test.Next(_L("Test Disk Space Notify With Plugin"));
+      
+    TInt drive;
+    TInt r = RFs::CharToDrive(gSessionPath[0],drive);
+    SAFETEST_KErrNone(r);
+    Format(drive);
+    
+    r = TheFs.MkDirAll(gSessionPath);
+    SAFETEST_KErrNone(r);
+     
+    r = TheFs.AddPlugin(KPreModifierPluginFileName);
+    SAFETEST_KErrNone(r);
+
+    r = TheFs.MountPlugin(KPreModifierPluginName);
+    SAFETEST_KErrNone(r);
+    
+    TInt64 free = FreeDiskSpace(drive);
+    TInt64 threshold = free - KTestFileSize + 1;
+    
+    TRequestStatus status;
+    TRequestStatus statusDeath;
+    
+    TheFs.NotifyDiskSpace(threshold, drive, status);
+    
+    RThread thread;
+    r = thread.Create(_L("PluginTestThread"), PluginTestThreadFunction, KStackSize, KHeapSize, KHeapSize, NULL);
+    SAFETEST_KErrNone(r);
+    thread.Logon(statusDeath);
+    thread.Resume();
+    
+    User::WaitForRequest(status);
+    SAFETEST_KErrNone(status.Int());
+    
+    TheFs.NotifyDiskSpace(threshold, drive, status);
+    User::WaitForRequest(status);
+    SAFETEST_KErrNone(status.Int());
+    
+    User::WaitForRequest(statusDeath);
+    SAFETEST_KErrNone(statusDeath.Int());
+    thread.Close();
+    
+    r = TheFs.DismountPlugin(KPreModifierPluginName);
+    SAFETEST_KErrNone(r);
+
+    r = TheFs.RemovePlugin(KPreModifierPluginName);
+    SAFETEST_KErrNone(r);
+
+    Format(drive);
+    }
+
 GLDEF_C void CallTestsL()
 //
 // Do all tests
@@ -1753,6 +1849,7 @@
 		}
 
 	TestChangeNotification();
+	TestDiskSpaceNotifyWithPlugin();
 
 	if( LffsDrive )
 		{
--- a/kerneltest/f32test/server/t_nmbs.cpp	Mon Jul 12 14:24:01 2010 +0100
+++ b/kerneltest/f32test/server/t_nmbs.cpp	Wed Jul 21 14:31:36 2010 +0100
@@ -18,6 +18,9 @@
 #include <e32test.h>
 #include "t_server.h"
 #include "t_chlffs.h"
+#include "f32_test_utils.h"
+
+using namespace F32_Test_Utils;
 
 GLDEF_D RTest test(_L("T_NMBS"));
 
@@ -225,13 +228,17 @@
 	}
 LOCAL_C void TestLongFileName()
 	{
-	#ifndef __EPOC32__ //emulator
-	if (gDriveToTest.GetLowerCase()=='c')
-		return;//don't perform this test for c: in emulator as emulator uses windows system calls
-		//windows doesn't create a directory with length more than 244 characters
-	#endif 
+	if (Is_SimulatedSystemDrive(TheFs, CurrentDrive()))
+		{
+		// Do not perform this test for the system drive of the emulator or PlatSim
+		// as they use Windows system calls.
+		// Windows does not create a directory with length more than 244 characters
+		// (247 including <drive>:\)
+		test.Printf(_L("TestLongFileName() skipped on simulated system drive.\n"));
+		return;
+		}
 	
-	 test.Next(_L("Test renaming 257 characters directories"));
+	test.Next(_L("Test renaming 257 characters directories"));
 	_LIT(KLongFileName256, "256dir_IncludingBackslash_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
 	_LIT(KLongFileName257, "257dir_IncludingBackslash_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
 	TBuf<260> Path;
@@ -884,7 +891,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test(atts&KEntryAttSystem);
+	test_Value((TInt)atts, atts&KEntryAttSystem);
 
 //	Change attributes to normal
 	file.Open(TheFs,_L("TEMPFILE.TMP"),EFileWrite);
@@ -897,7 +904,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test(atts==KEntryAttNormal);
+	test_Value((TInt)atts, atts==KEntryAttNormal);
 
 //	Attempt to change attributes from normal file to directory	
 	file.Open(TheFs,_L("TEMPFILE.TMP"),EFileWrite);
@@ -910,7 +917,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test((TInt)(atts&KEntryAttDir)==KErrNone);
+	test_Value((TInt)atts, (TInt)(atts&KEntryAttDir)==KErrNone);
 
 //	Change the attributes from normal file to hidden file
 	file.Open(TheFs,_L("TEMPFILE.TMP"),EFileWrite);
@@ -923,7 +930,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test(atts&KEntryAttHidden);
+	test_Value((TInt)atts, atts&KEntryAttHidden);
 
 //	Try to change the attributes from hidden file to volume	
 	file.Open(TheFs,_L("TEMPFILE.TMP"),EFileWrite);
@@ -936,7 +943,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test((TInt)(atts&KEntryAttVolume)==KErrNone);
+	test_Value((TInt)atts, (TInt)(atts&KEntryAttVolume)==KErrNone);
 
 //	Test RFile::Set() function	
 	
@@ -947,7 +954,7 @@
 	r=file.Att(atts);
 	test_KErrNone(r);
 	file.Close();
-	test(atts==KEntryAttNormal);
+	test_Value((TInt)atts, atts==KEntryAttNormal);
 
 //	Change attributes from hidden to system	- and change modification time
 	TDateTime dateTime(1998,EMay,25,18,23,0,0);
@@ -965,7 +972,7 @@
 	r=file.Modified(retTime);
 	test_KErrNone(r);
 	file.Close();
-	test(atts&KEntryAttSystem);
+	test_Value((TInt)atts, atts&KEntryAttSystem);
 	test(retTime==modTime1);
 
 //	Change attributes to normal - and change modification time
@@ -983,7 +990,7 @@
 	r=file.Modified(retTime);
 	test_KErrNone(r);
 	file.Close();
-	test(atts==KEntryAttNormal);
+	test_Value((TInt)atts, atts==KEntryAttNormal);
 	test(retTime==modTime2);
 
 //	Attempt to change attributes from normal file to directory	
@@ -999,7 +1006,7 @@
 	r=file.Modified(retTime);
 	test_KErrNone(r);
 	file.Close();
-	test((TInt)(atts&KEntryAttDir)==KErrNone);
+	test_Value((TInt)atts, (TInt)(atts&KEntryAttDir)==KErrNone);
 	test(retTime==modTime1);//	Modification time should have been set successfully
 
 //	Change the attributes from normal file to hidden file - and change modification time
@@ -1014,7 +1021,7 @@
 	test_KErrNone(r);
 	r=file.Modified(retTime);
 	file.Close();
-	test(atts&KEntryAttHidden);
+	test_Value((TInt)atts, atts&KEntryAttHidden);
 	test(retTime==modTime1);
 
 //	Try to change the attributes from hidden file to volume	
@@ -1030,7 +1037,7 @@
 	r=file.Modified(retTime);
 	test_KErrNone(r);
 	file.Close();
-	test((TInt)(atts&KEntryAttVolume)==KErrNone);
+	test_Value((TInt)atts, (TInt)(atts&KEntryAttVolume)==KErrNone);
 	test(retTime==modTime2);	//	Modification time should have been set successfully
 	
 	r=TheFs.Delete(_L("TEMPFILE.TMP"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/package_map.xml	Wed Jul 21 14:31:36 2010 +0100
@@ -0,0 +1,1 @@
+<PackageMap root="sf" layer="os"/>
--- a/userlibandfileserver/fileserver/group/release.txt	Mon Jul 12 14:24:01 2010 +0100
+++ b/userlibandfileserver/fileserver/group/release.txt	Wed Jul 21 14:31:36 2010 +0100
@@ -1,3 +1,17 @@
+Version 2.00.3053
+=================
+(Made by famustaf 12/07/2010)
+
+1.	h14jiang
+	1.	ou1cimx1#428840 Not getting any Notification from RFs::NotifyDiskSpace() for E and F drive when when tested multiple time.
+
+2.	famustaf
+	1.	ou1cimx1#466351 Modify t_nmbs for Platsim's HVFS
+
+3.	migubarr
+	1.	ou1cimx1#437919 File Server flushes FAT metadata too often
+
+
 Version 2.00.3052
 =================
 (Made by famustaf 01/07/2010)
--- a/userlibandfileserver/fileserver/inc/f32ver.h	Mon Jul 12 14:24:01 2010 +0100
+++ b/userlibandfileserver/fileserver/inc/f32ver.h	Wed Jul 21 14:31:36 2010 +0100
@@ -58,6 +58,6 @@
 
 @see TVersion
 */
-const TInt KF32BuildVersionNumber=3052;
+const TInt KF32BuildVersionNumber=3053;
 //
 #endif
--- a/userlibandfileserver/fileserver/sfile/sf_request.cpp	Mon Jul 12 14:24:01 2010 +0100
+++ b/userlibandfileserver/fileserver/sfile/sf_request.cpp	Wed Jul 21 14:31:36 2010 +0100
@@ -1116,7 +1116,9 @@
 		}
 
 	SetError(err);
-
+	
+    if (IsExpectedResult(err) && !IsPluginSpecific() && !IsNotifierSpecific())
+        DoNotifyDiskSpace(KErrNone);
 
 	// Start issuing the post-operation requests starting from the bottom of the chain
 	iCurrentPlugin = NULL;
@@ -1142,16 +1144,6 @@
 	{
 	__THRD_PRINT2(_L("----- CFsMessageRequest::Complete() req %08x with %d"), this, aError);
 
-	if (aError==KErrNoMemory)
-		{
-		if (iDrive)	// Not all message requests are associated with a drive!
-			{
-			TDriveInfo di;
-			iDrive->DriveInfo(di);
-			if (di.iType == EMediaRam)
-				aError = KErrNoMemory;
-			}
-		}
 	if(aError!=KErrNone)
 		{
 		if(iOperation->IsOpenSubSess())
@@ -1298,9 +1290,7 @@
 	if(aError==KErrNone)
 		{
 		if(!(FsNotify::IsChangeQueEmpty(driveNumber)))
-			FsNotify::HandleChange(this,driveNumber);	
-		if ((driveNumber != KDriveInvalid) && !(FsNotify::IsDiskSpaceQueEmpty(driveNumber)))
-			FsNotify::HandleDiskSpace(this, DriveNumber());
+			FsNotify::HandleChange(this,driveNumber);
 	
 #ifdef SYMBIAN_F32_ENHANCED_CHANGE_NOTIFICATION
 		if 	(iOperation->iFunction == EFsFileWrite)
@@ -1337,6 +1327,16 @@
 		}
 	}
 
+void CFsMessageRequest::DoNotifyDiskSpace(TInt aError)
+    {
+    __PRINT1(_L("----- CFsMessageRequest::DoNotifyDiskSpace() with %d"),aError);
+    if(aError != KErrNone)
+        return;
+
+    TInt driveNumber = DriveNumber();
+    if ((driveNumber != KDriveInvalid) && !(FsNotify::IsDiskSpaceQueEmpty(driveNumber)))
+        FsNotify::HandleDiskSpace(this, driveNumber);
+    }
 
 void CFsMessageRequest::Free()
 //
--- a/userlibandfileserver/fileserver/sfile/sf_std.h	Mon Jul 12 14:24:01 2010 +0100
+++ b/userlibandfileserver/fileserver/sfile/sf_std.h	Wed Jul 21 14:31:36 2010 +0100
@@ -32,7 +32,7 @@
 #include <e32const_private.h>
 #include "sf_plugin.h"
 #include "sf_func.h"
-#include <f32plugin.h>
+#include <F32plugin.h>
 #include "f32trace.h"
 
 #define __PRINT1TEMP_ALWAYS(t,a) {{TBuf<KMaxFileName>temp(a);RDebug::Print(t,&temp);}}
@@ -1320,6 +1320,7 @@
    // TUid iUID;
 private:
 	void DoNotify(TInt aError);
+	void DoNotifyDiskSpace(TInt aError);
 	TInt DoInitialise();
 	TInt PostInitialise();
 	TBool DispatchToPlugin();