DISK_CACHE_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// 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 reference

NtDoc

No description available.

Windows Driver Kit DDI reference (ns-ntdddisk-_disk_cache_information)

_DISK_CACHE_INFORMATION structure

Description

The DISK_CACHE_INFORMATION structure is used with the IOCTL_DISK_GET_CACHE_INFORMATION request to retrieve cache information.

Members

ParametersSavable

Indicates, when set to 1, that the device is capable of saving any parameters in nonvolatile storage.

ReadCacheEnabled

Indicates, when set to 1, that the read cache is enabled.

WriteCacheEnabled

Indicates, when set to 1, that the write cache is enabled.

ReadRetentionPriority

Determines 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.

WriteRetentionPriority

See discussion under ReadRetentionPriority.

DisablePrefetchTransferLength

Disables 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.

PrefetchScalar

When 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.

DUMMYUNIONNAME

DUMMYUNIONNAME.ScalarPrefetch

DUMMYUNIONNAME.ScalarPrefetch.Minimum

Contains 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.Maximum

Contains 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.MaximumBlocks

Contains the maximum size, in blocks, of the transfer length.

DUMMYUNIONNAME.BlockPrefetch

DUMMYUNIONNAME.BlockPrefetch.Minimum

Contains 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.Maximum

Contains 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.

See also

DISK_CACHE_INFORMATION

IOCTL_DISK_GET_CACHE_INFORMATION


Win32 API reference (ns-winioctl-disk_cache_information)

DISK_CACHE_INFORMATION structure

Description

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.

Members

ParametersSavable

Indicates whether the device is capable of saving any parameters in nonvolatile storage.

ReadCacheEnabled

Indicates whether the read cache is enabled.

WriteCacheEnabled

Indicates whether the write cache is enabled.

ReadRetentionPriority

Determines 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.

WriteRetentionPriority

Determines 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.

DisablePrefetchTransferLength

Disables 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.

PrefetchScalar

If this member is TRUE, the union is a ScalarPrefetch structure. Otherwise, the union is a BlockPrefetch structure.

DUMMYUNIONNAME

DUMMYUNIONNAME.ScalarPrefetch

DUMMYUNIONNAME.ScalarPrefetch.Minimum

The 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.Maximum

The 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.MaximumBlocks

The maximum number of blocks which can be prefetched.

DUMMYUNIONNAME.BlockPrefetch

DUMMYUNIONNAME.BlockPrefetch.Minimum

The 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.Maximum

The 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.

See also

IOCTL_DISK_GET_CACHE_INFORMATION

IOCTL_DISK_SET_CACHE_INFORMATION