First public contribution.
1 // Copyright (c) 2008-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.
14 // f32\sfat\fat_config.inl
15 // FAT fsy configurator
24 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
27 //!! WARNING!! DO NOT edit this file !! '\sfat' component is obsolete and is not being used. '\sfat32'replaces it
29 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
30 //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
33 #ifndef FAT_CONFIGURATOR_INL
34 #define FAT_CONFIGURATOR_INL
36 //-----------------------------------------------------------------------------
38 Meaning of this parameter:
39 if not 0, ScanDrive will not run on finalised FAT volume, i.e. that has "CleanShutdown" flag set in FAT[1] by
41 See CFatMountCB::ScanDrive().
43 TBool TFatConfig::ScanDrvSkipFinalisedVolume() const
46 return iScanDrvSkipFinalisedVolume;
49 //-----------------------------------------------------------------------------
51 Meaning of this parameter:
52 if not 0, enables asynchronous mounting of the FAT32 volumes.
53 In particular background FAT32 scan for free clusters. See CAtaFatTable::CountFreeClustersL().
55 TBool TFatConfig::FAT32_AsynchMount() const
58 return iFAT32_AsynchMount;
61 //-----------------------------------------------------------------------------
63 Meaning of this parameter:
64 if not 0, enables using FSInfo sector data during FAT32 volumes mounting to determine number of free clusters etc.
66 TBool TFatConfig::FAT32_UseFSInfoOnMount() const
69 return iFAT32_UseFSInfoOnMount;
72 //-----------------------------------------------------------------------------
74 Meaning of this parameter:
75 if not 0, enables using FAT32 bit supercache that makes free FAT entries lookup faster
77 TBool TFatConfig::FAT32_UseBitSupercache() const
80 return iFAT32_UseBitSupercache;
83 //-----------------------------------------------------------------------------
85 Meaning of this parameter:
86 Overall FAT directory cache size in bytes
88 TUint32 TFatConfig::DirCacheSize() const
91 return iDirCacheSizeKB * K1KiloByte;
94 //-----------------------------------------------------------------------------
97 Meaning of this parameter:
98 Log2 of the maximal size of the dir. cache page in bytes. (Minimal size will be current cluster size)
100 TUint32 TFatConfig::DirCacheMaxPageSizeLog2() const
102 ASSERT(iInitialised);
103 return iDirCacheMaxPageSizeLog2;
107 Get FAT16 fixed cache parameters
108 @param aRdGrLog2 Log2(read granularity)
109 @param aWrGrLog2 Log2(write granularity)
111 void TFatConfig::Fat16FixedCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2) const
113 ASSERT(iInitialised);
114 aRdGrLog2 = iFat16FixedCacheReadGrLog2;
115 aWrGrLog2 = iFat16FixedCacheWriteGrLog2;
118 Get FAT32 LRU cache parameters
119 @param aRdGrLog2 Log2(read granularity)
120 @param aWrGrLog2 Log2(write granularity)
121 @param aCacheSize maximal cache size, bytes
123 void TFatConfig::Fat32LruCacheParams(TUint32& aRdGrLog2, TUint32& aWrGrLog2, TUint32& aCacheSize) const
125 ASSERT(iInitialised);
126 aRdGrLog2 = iFat32LRUCacheReadGrLog2;
127 aWrGrLog2 = iFat32LRUCacheWriteGrLog2;
128 aCacheSize = iFat32LRUCacheSizeKB * K1KiloByte;
133 Meaning of this parameter:
134 if not 0, "clean shutdown mask" bit in FAT16[1] will be used during volume finalisation.
135 Otherwise, FAT16[1] will not be affected during finalisation
137 TBool TFatConfig::FAT16_UseCleanShutDownBit() const
139 ASSERT(iInitialised);
140 return iFAT16_UseCleanShutDownBit;
145 //-----------------------------------------------------------------------------
147 Get leaf dir cache size
148 @return leaf dir cache size
150 TUint32 TFatConfig::LeafDirCacheSize() const
152 ASSERT(iInitialised);
153 return iLeafDirCacheSize;
157 get the minimum cache size setting for dynamic dir cache
158 @return minimum cache size in bytes
160 TUint32 TFatConfig::DynamicDirCacheSizeMin() const
162 ASSERT(iInitialised);
163 ASSERT(iDynamicDirCacheSizeMinKB < (KMaxTUint32 >> K1KiloByteLog2)); //check data overflow
164 return iDynamicDirCacheSizeMinKB << K1KiloByteLog2;
168 get the maximum cache size setting for dynamic dir cache
169 @return maximum cache size in bytes
171 TUint32 TFatConfig::DynamicDirCacheSizeMax() const
173 ASSERT(iInitialised);
174 ASSERT(iDynamicDirCacheSizeMaxKB < (KMaxTUint32 >> K1KiloByteLog2)); //check data overflow
175 return iDynamicDirCacheSizeMaxKB << K1KiloByteLog2;
179 retrieve the size of the maximal size of the dynamic dir cache page in log2.
180 (Minimal size will be current cluster size)
181 @return maximum page size in bytes in log2
183 TUint32 TFatConfig::DynamicDirCacheMaxPageSizeLog2() const
185 ASSERT(iInitialised);
186 return iDynamicDirCacheMaxPageSizeLog2;
190 #endif //FAT_CONFIGURATOR_INL