FAT File System Registry Settings (Windows CE 5.0)

Windows CE 5.0
Send Feedback

The file allocation table file system (FATFS) retrieves driver specific settings from the registry.

You can place FATFS settings at two different tiers in the registry hierarchy

  • Root file system key

    Settings made at the root key of the file system registry, HKEY_LOCAL_MACHINE\System\StorageManager\ FATFS, apply to every mounted instance of FATFS, unless explicitly overridden by a setting at a lower level. These setting apply to FATFS for all profiles.

  • Profile-specific settings

    Settings made at the Profiles registry subkey, HKEY_LOCAL_MACHINE\System\StorageManager\Profile\<MyProfileName>\FATFS, apply locally. That is, settings at this registry key apply only to mounted instances of FATFS on devices that report the profile <MyProfileName>.

The following table shows the registry settings for the FAT file system that you can place in

HKEY_LOCAL_MACHINE\System\StorageManager\FATFS

- or -

HKEY_LOCAL_MACHINE\System\StorageManager\Profile\<MyProfileName>\FATFS.

Registry value: TypeDescription
BufferSize: REG_DWORDSpecifies the number of sector-sized buffers to use for streams.

The default value is 64 for TFAT and 32 for FAT.

CacheSize: REG_DWORDThis value is deprecated for Windows CE 5.0 and later. Replace with FatCacheSize or DataCacheSize.

Indicates the size of the disk cache, in number of sectors. This value must be a power of 2 and at least 16 sectors. If set to zero, FATFS will determine the best cache size to use.

For more information, see CacheSize registry subkey.

CodePage: REG_DWORDOverrides CP_OEMCP in all character conversions.
DataCacheSize: REG_DWORDIndicates the size of the data cache, in number of sectors. This value must be a power of 2 and at least 16 sectors. If set to zero, FATFS will determine the best cache size to use, up to twice the size of FatCacheSize.

For more information, see CacheSize registry subkey.

Dll: REG_SZSpecifies the name of the file system DLL.
EnableCache: REG_DWORDControls caching.
  • 0 - Disables caching
  • 1 - Enables caching
EnableCacheWarm: REG_DWORDThis value is deprecated for Windows CE 5.0 and later. Replace with EnableFatCacheWarm or EnableDataCacheWarm.

Set to 1 to enable pre-warming of the Fat cache. That is, the cache is pre-loaded to capacity with data on initialization. For example, if the cache is n sectors, the first n sectors of the cached region is read from disk.

EnableFatCacheWarm: REG_DWORDSet to 1 to enable pre-warming of the data cache. That is, the cache is pre-loaded to capacity with data on initialization. For example, if the cache is n sectors, the first n sectors of the cached region is read from disk.
EnableDataCacheWarm: REG_DWORDSet to 1 to enable pre-warming of the cache. That is, the cache is pre-loaded to capacity with data on initialization. For example, if the cache is n sectors, the first n sectors of the cached region is read from disk.
EnableWriteBack: REG_DWORDEnables a write-back or write-through cache.
  • 0 - To use a write-through cache
  • 1 - Enables write-back cache

This setting applies only to Windows CE 5.0 and later.

FatCacheSize: REG_DWORDIndicates the size of the FAT cache, in number of sectors. This value must be a power of 2 and at least 16 sectors. If set to zero, FATFS will determine the best cache size to use, based on size of the FATFS up to 512 sectors.

For more information, see CacheSize registry subkey.

Flags: REG_DWORDIndicates FAT file system registry flags. Default is 64.

For more information, see Flags registry subkey.

FormatTfat: REG_DWORDFormats the volume as TFAT on auto-format or through IOCTL_DISK_FORMAT_VOLUME.
FriendlyName: REG_SZSpecifies a friendly name for the file system.
MountFlags: REG_DWORDThis value is deprecated for Windows CE 5.0 and later. For replacement values, see Mount Settings.
MountLabel: REG_DWORDPulls the volume label and uses it as a mount point.
Paging: REG_DWORDControls paging.
  • 0 - Disables paging
  • 1 - Enables paging
Util: REG_SZSpecifies the DLL name of utility to do format and scan.
LazyWriterThreadPrio256: REG_DWORDSets the priority of the lazy writer thread. Default is idle.

For more information, see Lazy-Writer Thread.

Note: When you enable pre-warming of the FAT or data cache, you trade longer boot times for quicker cache access when fully booted. To determine the settings that offer the best performance for your target device, experiment with different values for EnableFatCacheWarm and EnableDataCacheWarm.

Default FATFS Settings

The following registry key example is the default for the FAT file system; profiles can override these values:

[HKEY_LOCAL_MACHINE\System\StorageManager\FATFS]
    "FriendlyName"="FAT FileSystem"
    "Dll"="fatfsd.dll"
    "Flags"=dword:00000024
    "Paging"=dword:1
    "CacheSize"=dword:0

Flags registry subkey

The following table shows the available values you can set for the Flags registry subkey; set Flags to a combination of these values.

FlagValueDescription
FATFS_UPDATE_ACCESS0x00000001Updates access times.
FATFS_DISABLE_LOG0x00000002Disables event logging.
FATFS_DISABLE_AUTOSCAN0x00000004Disables automatic calls to ScanVolume.
FATFS_VERIFY_WRITES0x00000008Verifies all writes.
FATFS_ENABLE_BACKUP_FAT0x00000010Adds a backup FAT to all formats.
FATFS_FORCE_WRITETHROUGH0x00000020Sets all files to WRITE_THROUGH, regardless of the parameters to CreateFile.
FATFS_DISABLE_AUTOFORMAT0x00000040Disables automatic formatting of unformatted volumes.
FATFS_WFWS_NOWRITETHRU0x00010000Disables write through on the WriteFileWithSeek function. Improves memory-mapped file performance.
FATFS_DISABLE_FORMAT0x00020000Disables format.
FATFS_TRANS_DATA0x00040000Transacts data on a write operation.
FATFS_TFAT_NONATOMIC_SECTOR0x00080000Uses the cluster 1 entry in the FAT table for a TFAT transaction. TFAT uses the NOF field of the boot sector by default.
FATFS_DISABLE_TFAT_REDIR0x00100000Disables the redirect of the root directory to another hidden directory for FAT12 or 16.
FATFS_TFAT_ALWAYS0x00200000Marks transaction status, even if only one sector in FAT is changed.
FATFS_FORCE_TFAT0x00400000Forces TFAT transactions even if the volume is not formatted as TFAT.
FATFS_LFN_EXTENDED0x00800000Generate LFN entries for extended characters always
FATFS_TFAT_DISABLE_MOVEDIR0x01000000Disable movefile on a directory for TFAT because it isn't transaction-safe

CacheSize registry subkey

The CacheSize registry subkey is a hexadecimal number of sectors to cache. This has to be a power of two. The following table shows valid numbers for the CacheSize registry subkey.

Registry entryNumber of sectorsCache in kilobytes (KB)
221
442
884
10168
201632
406432
8012864
100256128
200512256
4001024512
80020481024
100040962048

See Also

File System Driver Creation | File System Driver Loading | Storage Manager | File System Filters | Block Drivers


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: