persistentstorage/dbms/ustor/US_FILE.CPP
changeset 29 cce6680bbf1c
parent 28 7a522c0700d3
child 55 44f437012c90
--- a/persistentstorage/dbms/ustor/US_FILE.CPP	Fri May 14 13:32:10 2010 +0100
+++ b/persistentstorage/dbms/ustor/US_FILE.CPP	Thu Jul 01 17:02:22 2010 +0100
@@ -97,13 +97,11 @@
 		{
 	default:
 		__LEAVE(KErrNotSupported);
-	case TDbFormat::ECreate:
-//  When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity .	    
-		store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite/EFileWriteDirectIO);
+	case TDbFormat::ECreate:   
+		store=CPermanentFileStore::CreateL(iFs,aName,EFileRead|EFileWrite);
 		break;
 	case TDbFormat::EReplace:
-//  When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity .
-		store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite/EFileWriteDirectIO);
+		store=CPermanentFileStore::ReplaceL(iFs,aName,EFileRead|EFileWrite);
 		break;
 		};
 	iStore=store;
@@ -146,8 +144,6 @@
 //
 	iName=aName.AllocL();
 	TUint mode=aMode==TDbFormat::EReadOnly ? EFileShareReadersOnly : EFileWrite;
-//	When the file cache in file server is on, the order of file writing is not guaranteed which could cause data inconsistency in some circumstances, for example, when the power is lost in the middle of data transaction. Therefore, the file write cache is switched off here to maintain the file integrity .
-	mode = mode|EFileWriteDirectIO;
 	CFileStore* store=CPermanentFileStore::OpenL(iFs,*iName,mode);
 	iStore=store;
 	CDbStoreDatabase::RestoreL(DatabaseIdL(store->Root()));