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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
25 #if !defined(__F32DBG_H__)
34 A bit value indicating that tracing is to be active in
35 file system code, when set through a call to RFs::SetDebugRegister()
36 in _DEBUG or _DEBUG_RELEASE mode.
45 A bit value indicating that tracing is to be active in
46 file server code, when set through a call to RFs::SetDebugRegister()
47 in _DEBUG or _DEBUG_RELEASE mode.
56 A bit value indicating that tracing is to be active in
57 the loader code, when set through a call to RFs::SetDebugRegister()
58 in _DEBUG or _DEBUG_RELEASE mode.
67 A bit value indicating that the number of (simulated) allocation
68 failures to complete a given function is to be printed, when set
69 through a call to RFs::SetDebugRegister() in _DEBUG or _DEBUG_RELEASE mode.
78 A bit value indicating that tracing is to be active in
79 LFFS code, when set through a call to RFs::SetDebugRegister()
80 in _DEBUG or _DEBUG_RELEASE mode.
89 A bit value indicating that tracing is to be active in
90 ISO9660 code, when set through a call to RFs::SetDebugRegister()
91 in _DEBUG or _DEBUG_RELEASE mode.
93 #define KISO9660 0x0020
100 A bit value indicating that tracing is to be active in
101 NTFS code, when set through a call to RFs::SetDebugRegister()
102 in _DEBUG or _DEBUG_RELEASE mode.
111 A bit value indicating that tracing is to be active in
112 ROFS code, when set through a call to the function RFs::SetDebugRegister()
113 in _DEBUG or _DEBUG_RELEASE mode.
122 A bit value indicating that tracing is to be active in
123 concurrent file system code, when set through a call to the function RFs::SetDebugRegister()
124 in _DEBUG or _DEBUG_RELEASE mode.
131 #define KCACHE 0x0200
138 A bit value indicating that tracing is to be active in
139 COMPFS code, when set through a call to the function RFs::SetDebugRegister()
140 in _DEBUG or _DEBUG_RELEASE mode.
142 #define KCOMPFS 0x0400
146 // #define _DEBUG_RELEASE
148 const TInt KAllocFailureOn=0;
149 const TInt KAllocFailureOff=-1;
152 #if defined(_DEBUG) || defined(_DEBUG_RELEASE)
153 const TInt KControlIoCancelNCNotifier=KMaxTInt-1;
154 const TInt KControlIoNCDebugNotifierOn=KMaxTInt-2;
155 const TInt KControlIoNCDebugNotifierOff=KMaxTInt-3;
156 const TInt KControlIoGetCorruptLogRecord=KMaxTInt-4;
157 const TInt KControlIoGetNumberOfCorruptLogRecords=KMaxTInt-5;
158 const TInt KControlIoGetCorruptListFile=KMaxTInt-6;
159 const TInt KControlIoCorruptLogRecordReset=KMaxTInt-7;
160 const TInt KControlIoCacheCount=KMaxTInt-8;
161 const TInt KControlIoGetLocalDriveNumber=KMaxTInt-9;
162 const TInt KControlIoCancelDeferredDismount=KMaxTInt-10;
163 const TInt KControlIoFileCacheFlagsWrite=KMaxTInt-11;
164 const TInt KControlIoFileCacheStats=KMaxTInt-12;
165 const TInt KControlIoFlushClosedFiles=KMaxTInt-13;
166 const TInt KControlIoSimulateLockFailureMode=KMaxTInt-14;
167 const TInt KControlIoFileCacheDump=KMaxTInt-15;
168 const TInt KControlIoAllocateMaxSegments=KMaxTInt-16;
170 const TInt KControlIoDisableFatUtilityFunctions=KMaxTInt-17;
171 const TInt KControlIoEnableFatUtilityFunctions=KMaxTInt-18;
172 const TInt KControlIoFileCacheConfig=KMaxTInt-19;
173 const TInt KControlIoSimulateFileCacheWriteFailure=KMaxTInt-20;
175 const TInt KNCDebugNotifierValue=-500000; // between 0 and 1 second
177 GLREF_D TInt DebugNCNotifier;
182 TInt iFreeCount; // number of requests on free queue
183 TInt iCloseCount; // number of requests on close queue
184 TInt iAllocated; // number of dynamically allocated requests
185 TInt iTotalCount; // number of permanently & dynamically allocated requests
188 class TFileCacheStats
193 TInt iLockedSegmentCount;
194 TInt iAllocatedSegmentCount;
196 TInt iFilesOnClosedQueue;
199 TInt iUncachedPacketsRead;
200 TInt iUncachedBytesRead;
202 TInt iUncachedPacketsWritten;
203 TInt iUncachedBytesWritten;
205 TInt iCommitFailureCount;
206 TInt iLockFailureCount;
209 class TFileCacheConfig
214 TBool iFileCacheReadAsync;
215 TInt32 iFairSchedulingLen; // in bytes
216 TInt32 iCacheSize; // in bytes
217 TInt32 iMaxReadAheadLen; // in bytes
218 TInt32 iClosedFileKeepAliveTime; // in microseconds
219 TInt32 iDirtyDataFlushTime; // in microseconds
222 struct TFsDebugCorruptLogRecord
224 TFileName iProcessName;
229 typedef TPckgBuf <TFsDebugCorruptLogRecord> TFsDebugCorruptLogRecordBuf;
231 extern TBool EnableFatUtilityFunctions;
235 enum TLoaderDebugFunction
237 ELoaderDebug_SetHeapFail,
238 ELoaderDebug_SetRFsFail
242 enum TFsDebugFunction
245 EFsSetErrorCondition,