// ntdddisk.h
typedef struct _DISK_CACHE_INFORMATION {
BOOLEAN ParametersSavable;
BOOLEAN ReadCacheEnabled;
BOOLEAN WriteCacheEnabled;
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
USHORT DisablePrefetchTransferLength;
BOOLEAN PrefetchScalar;
union {
struct {
USHORT Minimum;
USHORT Maximum;
USHORT MaximumBlocks;
} ScalarPrefetch;
struct {
USHORT Minimum;
USHORT Maximum;
} BlockPrefetch;
} DUMMYUNIONNAME;
} DISK_CACHE_INFORMATION, *PDISK_CACHE_INFORMATION;
View the official Windows Driver Kit DDI reference// winioctl.h
typedef struct _DISK_CACHE_INFORMATION {
BOOLEAN ParametersSavable;
BOOLEAN ReadCacheEnabled;
BOOLEAN WriteCacheEnabled;
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority;
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority;
WORD DisablePrefetchTransferLength;
BOOLEAN PrefetchScalar;
union {
struct {
WORD Minimum;
WORD Maximum;
WORD MaximumBlocks;
} ScalarPrefetch;
struct {
WORD Minimum;
WORD Maximum;
} BlockPrefetch;
} DUMMYUNIONNAME;
} DISK_CACHE_INFORMATION, *PDISK_CACHE_INFORMATION;
View the official Win32 API referenceNo description available.
The DISK_CACHE_INFORMATION structure is used with the IOCTL_DISK_GET_CACHE_INFORMATION request to retrieve cache information.
ParametersSavableIndicates, when set to 1, that the device is capable of saving any parameters in nonvolatile storage.
ReadCacheEnabledIndicates, when set to 1, that the read cache is enabled.
WriteCacheEnabledIndicates, when set to 1, that the write cache is enabled.
ReadRetentionPriorityDetermines the likelihood of various types of data remaining in the cache. By means of this value, for instance, data cached from a READ or WRITE operation might be given a different priority than data cached under other circumstances, such as prefetch operations. Thus a value of EqualPriority indicates that no data is held in the cache on a preferential basis. When ReadRetentionPriority is set to EqualPriority, all types of data have equal access to cache memory. On the other hand, a value of KeepPrefetchedData indicates that a preference is to be given to prefetched data while a value of KeepReadData indicates that a preference is to be given to data cached from a READ operation. For more information about the values that can be assigned to this member see the DISK_CACHE_RETENTION_PRIORITY enumeration.
WriteRetentionPrioritySee discussion under ReadRetentionPriority.
DisablePrefetchTransferLengthDisables prefetching. Prefetching might be disabled whenever the number of blocks requested exceeds the value in DisablePrefetchTransferLength. When zero, prefetching is disabled no matter what the size of the block request.
PrefetchScalarWhen TRUE, Indicates that ScalarPrefetch.Maximum should be used together with the transfer length to calculate the amount of data that can be prefetched. When FALSE, BlockPrefetch.Maximum will be the maximum number of disk blocks that can be prefetched.
DUMMYUNIONNAMEDUMMYUNIONNAME.ScalarPrefetchDUMMYUNIONNAME.ScalarPrefetch.MinimumContains the scalar multiplier of the transfer length of the request when PrefetchScalar is TRUE. If PrefetchScalar is TRUE, the value in ScalarPrefetch.Minimum is multiplied by the transfer length to obtain the minimum amount of data that can be prefetched into the cache on a disk operation.
DUMMYUNIONNAME.ScalarPrefetch.MaximumContains the scalar multiplier of the transfer length of the request when PrefetchScalar is TRUE. If PrefetchScalar is TRUE, the value in ScalarPrefetch.Maximum is multiplied by the transfer length to obtain the maximum amount of data that can be prefetched into the cache on a disk operation.
DUMMYUNIONNAME.ScalarPrefetch.MaximumBlocksContains the maximum size, in blocks, of the transfer length.
DUMMYUNIONNAME.BlockPrefetchDUMMYUNIONNAME.BlockPrefetch.MinimumContains the scalar multiplier of the transfer length of the request when PrefetchScalar is TRUE. If PrefetchScalar is TRUE, the value in ScalarPrefetch.Minimum is multiplied by the transfer length to obtain the minimum amount of data that can be prefetched into the cache on a disk operation.
DUMMYUNIONNAME.BlockPrefetch.MaximumContains the scalar multiplier of the transfer length of the request when PrefetchScalar is TRUE. If PrefetchScalar is TRUE, the value in ScalarPrefetch.Maximum is multiplied by the transfer length to obtain the maximum amount of data that can be prefetched into the cache on a disk operation.
DISK_CACHE_INFORMATION
IOCTL_DISK_GET_CACHE_INFORMATION
Provides information about the disk cache.This structure is used by the IOCTL_DISK_GET_CACHE_INFORMATION and IOCTL_DISK_SET_CACHE_INFORMATION control codes.
ParametersSavableIndicates whether the device is capable of saving any parameters in nonvolatile storage.
ReadCacheEnabledIndicates whether the read cache is enabled.
WriteCacheEnabledIndicates whether the write cache is enabled.
ReadRetentionPriorityDetermines the likelihood of data cached from a read operation remaining in the cache. This data might be given a different priority than data cached under other circumstances, such as from a prefetch operation.
This member can be one of the following values from the DISK_CACHE_RETENTION_PRIORITY enumeration type.
| Value | Meaning |
|---|---|
| EqualPriority 0 |
No data is held in the cache on a preferential basis. |
| KeepPrefetchedData 1 |
A preference is to be given to prefetched data. |
| KeepReadData 2 |
A preference is to be given to data cached from a read operation. |
WriteRetentionPriorityDetermines the likelihood of data cached from a write operation remaining in the cache. This data might be given a different priority than data cached under other circumstances, such as from a prefetch operation.
DisablePrefetchTransferLengthDisables prefetching. Prefetching might be disabled whenever the number of blocks requested exceeds the value in DisablePrefetchTransferLength. When zero, prefetching is disabled no matter what the size of the block request.
PrefetchScalarIf this member is TRUE, the union is a ScalarPrefetch structure. Otherwise, the union is a BlockPrefetch structure.
DUMMYUNIONNAMEDUMMYUNIONNAME.ScalarPrefetchDUMMYUNIONNAME.ScalarPrefetch.MinimumThe scalar multiplier of the transfer length of the request. This member is valid only when PrefetchScalar is TRUE. When PrefetchScalar is TRUE, this value is multiplied by the transfer length to obtain the minimum amount of data that can be prefetched into the cache on a disk operation.
DUMMYUNIONNAME.ScalarPrefetch.MaximumThe scalar multiplier of the transfer length of the request. This member is valid only when PrefetchScalar is TRUE. When PrefetchScalar is TRUE, this value is multiplied by the transfer length to obtain the maximum amount of data that can be prefetched into the cache on a disk operation.
DUMMYUNIONNAME.ScalarPrefetch.MaximumBlocksThe maximum number of blocks which can be prefetched.
DUMMYUNIONNAME.BlockPrefetchDUMMYUNIONNAME.BlockPrefetch.MinimumThe minimum amount of data that can be prefetched into the cache on a disk operation, as an absolute number of disk blocks. This member is valid only when PrefetchScalar is FALSE.
DUMMYUNIONNAME.BlockPrefetch.MaximumThe maximum amount of data that can be prefetched into the cache on a disk operation, as an absolute number of disk blocks. This member is valid only when PrefetchScalar is FALSE.
IOCTL_DISK_GET_CACHE_INFORMATION
IOCTL_DISK_SET_CACHE_INFORMATION