Update contrib.
1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 // WARNING: This file contains some APIs which are internal and are subject
17 // to change without notice. Such APIs should therefore not be used
18 // outside the Kernel and Hardware Services package.
26 #if !defined(__F32DBG_H__)
29 #include <e32std_private.h>
36 A bit value indicating that tracing is to be active in
37 file system code, when set through a call to RFs::SetDebugRegister()
38 in _DEBUG or _DEBUG_RELEASE mode.
47 A bit value indicating that tracing is to be active in
48 file server code, when set through a call to RFs::SetDebugRegister()
49 in _DEBUG or _DEBUG_RELEASE mode.
58 A bit value indicating that tracing is to be active in
59 the loader code, when set through a call to RFs::SetDebugRegister()
60 in _DEBUG or _DEBUG_RELEASE mode.
69 A bit value indicating that the number of (simulated) allocation
70 failures to complete a given function is to be printed, when set
71 through a call to RFs::SetDebugRegister() in _DEBUG or _DEBUG_RELEASE mode.
80 A bit value indicating that tracing is to be active in
81 LFFS code, when set through a call to RFs::SetDebugRegister()
82 in _DEBUG or _DEBUG_RELEASE mode.
91 A bit value indicating that tracing is to be active in
92 ISO9660 code, when set through a call to RFs::SetDebugRegister()
93 in _DEBUG or _DEBUG_RELEASE mode.
95 #define KISO9660 0x0020
102 A bit value indicating that tracing is to be active in
103 NTFS code, when set through a call to RFs::SetDebugRegister()
104 in _DEBUG or _DEBUG_RELEASE mode.
113 A bit value indicating that tracing is to be active in
114 ROFS code, when set through a call to the function RFs::SetDebugRegister()
115 in _DEBUG or _DEBUG_RELEASE mode.
124 A bit value indicating that tracing is to be active in
125 concurrent file system code, when set through a call to the function RFs::SetDebugRegister()
126 in _DEBUG or _DEBUG_RELEASE mode.
133 #define KCACHE 0x0200
140 A bit value indicating that tracing is to be active in
141 COMPFS code, when set through a call to the function RFs::SetDebugRegister()
142 in _DEBUG or _DEBUG_RELEASE mode.
144 #define KCOMPFS 0x0400
151 A bit value indicating that tracing is to be active in
152 file server plugin support code, when set through a call
153 to the function RFs::SetDebugRegister()
155 #define KPLUGIN 0x0800
158 // #define _DEBUG_RELEASE
160 const TInt KAllocFailureOn=0;
161 const TInt KAllocFailureOff=-1;
164 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
165 const TInt KControlIoCancelNCNotifier=KMaxTInt-1;
166 const TInt KControlIoNCDebugNotifierOn=KMaxTInt-2;
167 const TInt KControlIoNCDebugNotifierOff=KMaxTInt-3;
168 const TInt KControlIoGetCorruptLogRecord=KMaxTInt-4;
169 const TInt KControlIoGetNumberOfCorruptLogRecords=KMaxTInt-5;
170 const TInt KControlIoGetCorruptListFile=KMaxTInt-6;
171 const TInt KControlIoCorruptLogRecordReset=KMaxTInt-7;
172 const TInt KControlIoCacheCount=KMaxTInt-8;
173 const TInt KControlIoGetLocalDriveNumber=KMaxTInt-9;
174 const TInt KControlIoCancelDeferredDismount=KMaxTInt-10;
175 const TInt KControlIoFileCacheFlagsWrite=KMaxTInt-11;
176 const TInt KControlIoFileCacheStats=KMaxTInt-12;
177 const TInt KControlIoFlushClosedFiles=KMaxTInt-13;
178 const TInt KControlIoSimulateLockFailureMode=KMaxTInt-14;
179 const TInt KControlIoFileCacheDump=KMaxTInt-15;
180 const TInt KControlIoAllocateMaxSegments=KMaxTInt-16;
182 const TInt KControlIoDisableFatUtilityFunctions=KMaxTInt-17;
183 const TInt KControlIoEnableFatUtilityFunctions=KMaxTInt-18;
184 const TInt KControlIoFileCacheConfig=KMaxTInt-19;
185 const TInt KControlIoSimulateFileCacheWriteFailure=KMaxTInt-20;
187 const TInt KNCDebugNotifierValue=-500000; // between 0 and 1 second
189 GLREF_D TInt DebugNCNotifier;
194 TInt iFreeCount; // number of requests on free queue
195 TInt iCloseCount; // number of requests on close queue
196 TInt iAllocated; // number of dynamically allocated requests
197 TInt iTotalCount; // number of permanently & dynamically allocated requests
200 class TFileCacheStats
205 TInt iLockedSegmentCount;
206 TInt iAllocatedSegmentCount;
208 TInt iFilesOnClosedQueue;
211 TInt iUncachedPacketsRead;
212 TInt iUncachedBytesRead;
214 TInt iUncachedPacketsWritten;
215 TInt iUncachedBytesWritten;
217 TInt iCommitFailureCount;
218 TInt iLockFailureCount;
220 TInt iWriteThroughWithDirtyDataCount;
223 class TFileCacheConfig
228 TBool iFileCacheReadAsync;
229 TInt32 iFairSchedulingLen; // in bytes
230 TInt32 iCacheSize; // in bytes
231 TInt32 iMaxReadAheadLen; // in bytes
232 TInt32 iClosedFileKeepAliveTime; // in microseconds
233 TInt32 iDirtyDataFlushTime; // in microseconds
236 struct TFsDebugCorruptLogRecord
238 TFileName iProcessName;
243 typedef TPckgBuf <TFsDebugCorruptLogRecord> TFsDebugCorruptLogRecordBuf;
245 extern TBool EnableFatUtilityFunctions;
249 enum TLoaderDebugFunction
251 ELoaderDebug_SetHeapFail,
252 ELoaderDebug_SetRFsFail
256 enum TFsDebugFunction
259 EFsSetErrorCondition,