[MDEV-19388] Improve SSD detection in fil_node_t::get_metadata on Windows Created: 2019-05-03  Updated: 2019-05-07  Resolved: 2019-05-07

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows, Storage Engine - InnoDB
Affects Version/s: None
Fix Version/s: 10.4.5

Type: Bug Priority: Major
Reporter: Vladislav Vaintroub Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None


 Description   

Currently, for SSD detection on Windows, innodb uses DeviceIOControl with IOCTL_STORAGE_QUERY_PROPERTY/StorageDeviceSeekPenaltyProperty . On multiple machines, especially in cloud, it would fail (not implemented, or other reason).

However, SSD can be detected with other means, e.g if TRIM is enabled (s. https://stackoverflow.com/questions/23363115/detecting-ssd-in-windows) . Support for this in DeviceIoControl is better, at least Azure machines correctly return the value.

We should call DeviceIOControl w.IOCTL_STORAGE_QUERY_PROPERTY with StorageDeviceSeekPenaltyProperty first, then fallback to StorageDeviceTrimProperty, and if both fails, decide it is ultimately not SSD.


Generated at Thu Feb 08 08:51:18 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.