Share via

NVMe Self-Test producing STORAGE_PROTOCOL_STATUS_THROTTLED_REQUEST on second run

randomhiker27 26 Reputation points
2021-07-23T15:15:54.5+00:00

I've implemented some code that runs the NVMe Short and Extended Self-Tests using IOCTL_STORAGE_PROTOCOL_COMMAND with the Microsoft NVMe driver (stornvme.sys). This code works as expected in that the self-tests run, I can query their progress, and determine the self-test result. This IOCTL feature was introduced in Windows 10 (1903) and was working reliably in Windows 10 (1909).

Starting in Windows 10 (2004), a subsequent run of a self-test within around 10-11 minutes of the last self-test produces a ReturnStatus of STORAGE_PROTOCOL_STATUS_THROTTLED_REQUEST. This occurs even if the self-test runs and completes in a matter of a few seconds. If you wait 10-11 minutes then you can successfully issue the request again. This same behavior has persisted with newer versions of Windows including Windows 11 Insider Preview (22000.100).

This ReturnStatus is not currently documented on MSDN (https://learn.microsoft.com/en-us/windows/win32/api/winioctl/ns-winioctl-storage_protocol_command) and appeared recently in the Windows 10 SDK (10.0.19041.0) for Windows 10 (2004).

While I imagine this is likely an intentional decision by someone at Microsoft to throttle these types of requests, it is quite cumbersome when trying to provide diagnostics to end-users. Users may very well run a Short Self-test followed by an Extended Self-Test, or even run the same diagnostics twice within a few minutes. Any non-pass result is often assumed to be a problem and that the drive is suspect no matter how well you try to explain that non-good status to them. I'll also note that I have not seen other Windows NVMe drivers enforce any kind of throttling on self-test requests.

So my questions:
* Is this intentional behavior? If so, can you consider changing it, and if not why?
* When will MSDN documentation be updated to describe the ReturnStatus of STORAGE_PROTOCOL_STATUS_THROTTLED_REQUEST?

For reference:
* https://learn.microsoft.com/en-us/windows-hardware/drivers/storage/stornvme-command-set-support
* https://social.msdn.microsoft.com/Forums/sqlserver/en-US/044e0f9b-abbf-47c6-a858-1b52099db1d7/nvme-seftest-windows-10?forum=wdk

Windows development | Windows API - Win32
Windows for business | Windows Client for IT Pros | Devices and deployment | Other

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.