Search

A technology, a device or an article

The word “retry” in NVMe status

DNR concerns retrying the same command. CRD selects a delay under specified conditions, while host policy decides how the request proceeds.

Blank cards pass a hinged gate in a rust and mint print illustration
ITNWS AI-generated conceptual illustration. The gate and routes are a command-retry metaphor, not a literal NVMe diagram.ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

“Just retry” is convenient advice until we ask exactly what is to be repeated. Is it a user pressing a button, an application request for a file, a driver command for an SSD, or the bytes of a request that has already been sent? In normal conversation, these actions easily merge. In NVMe, for one of them there is a very specific Do Not Retry, DNR flag. Its name sounds almost like a ban on further actions at all. In fact, the field indicates the fate of the same command when resent within the NVM subsystem. Preserving the subject of this statement is more important than giving the English abbreviation an unnecessarily menacing meaning in translation.

NVM Express Base 2.0d is dated January 11, 2024. In the definition of completion status, a DNR set to one indicates that the same command is expected to fail when sent again to any controller in the same subsystem. If it is zero, the same command may succeed when repeated. Maybe is the key word. Zero does not guarantee the success of the next attempt, does not force an infinite loop, and does not tell how long the cause of the previous failure took. Document verified November 2, 2026; This is a review of the existing contract, not today’s protocol change.

The status must be read in its entirety. The Status Code Type, SCT, field specifies the code family, and the Status Code, SC, specifies the value within it. A number without a type can become meaningless because different families have their own definitions. DNR adds a retry hint rather than replacing a description of the cause. If the interface only saves a red “error” and a retry button, it discards that part of the device’s response that allowed it to meaningfully decide the fate of the request. The color red is not a protocol decoder, just as one familiar number is not a complete status.

This is especially noticeable on a hypothetical command with an unsupported parameter. Repeating it without changing means submitting the same invalid request again. Waiting by itself does not create support for the missing field. But the application can rebuild the operation with other valid parameters, choosing the intended method to obtain the desired result. This new command is no longer identical to the previous one. DNR does not prohibit a person from solving the original problem in a different way. It keeps the software stack from mindlessly automatically repeating what the device deems doomed in its previous form.

In the opposite hypothetical situation, the reason for failure is related to a temporary condition. The ability to repeat is then useful, but its cost depends on the access mode and host policy. An immediate tight loop can add load without bringing the point of readiness any closer. A pause that is too long can unnecessarily increase user latency. The protocol needs a way to communicate an appropriate wait, and the operating system needs to decide how to incorporate it into its own time and retry limits. Here begins another word that the everyday “repeat” usually leaves unspoken: when.

The same edition of the specification includes Command Retry Delay, CRD. Under the intended conditions, a value of zero means that there is no required delay, and a non-zero value selects one of the CRDT1, CRDT2, or CRDT3 fields of the Identify Controller structure. The CRD itself is not a number of milliseconds. This is selecting a value from somewhere else in the interface. To apply the definition, you need a DNR of zero and Advanced Command Retry Enable enabled by the host in Host Behavior Support. Unless these conditions are met, any set of bits cannot be mechanically treated as a universal repeat timer.

The selected CRDT is expressed in hundreds of milliseconds. In the hypothetical example, the value 7 means 700 milliseconds, not seven attempts and not seven microseconds. The specification recommends taking an appropriate pause; however, an early retry is not declared a separate protocol error. This subtlety shows the difference between a rule of interpretation, a recommendation of behavior, and a guarantee of a result. Waiting the correct interval makes the retry consistent with the prompt, but does not make the subsequent command a required success. The cause may persist or arise again due to other circumstances.

Linux NVMe host core source code, read on preparation day, gives a concrete example of the implementation policy. The next action selection function completes the request without another retry if DNR is set, if the request itself prohibits retry, or if the retry limit has been reached. In other specified cases, repetition, path switching and other actions are considered. This is the behavior of the source code branch examined, not a promise of the same logic for every driver and every version of Linux. The important fact is that the controller hint contributes to the decision along with the host constraints.

There, the CRD selection is used to access an array of CRDT values and calculate the delay. The reader comparing the completion dump with the driver’s internal number must consider the status representation. The completion queue has a phase tag and an arrangement of fields within a word, and the library can already shift or extract the status for its constants. Therefore, copying one hexadecimal mask from someone else’s example without knowing the format is dangerous for the explanation of the error itself. First, it is determined which representation is stored, then the appropriate decoder is applied.

libnvme definitions are useful as a primary source for names and masks, but do not replace the need to check the meaning against the specification. A library constant describes the programming interface of a specific project. The device field is described at its own level. A person may encounter both types of records in the same report, mistake the shifted value for a raw DW3, and receive a convincing but incorrect DNR. This defect is not a malfunction of the SSD. It arises in the translation of evidence from one language of presentation to another.

An hourglass and two blue cards, the front card bearing an interrupted loop
ITNWS AI-generated conceptual illustration. The hourglass and cards distinguish waiting from changing a request; no actual device status is shown. — ITNWS · image_gen · Original ITNWS AI-generated conceptual editorial illustration

Another grammatical catch lies in the word “complete”. The driver’s internal COMPLETE decision after an error status is to stop processing the request at that level and pass the result on. It does not convert a device failure into a successful user operation. The completion function must report an error if that is what the command returned. If you call such a path “successful completion” only by the name of the code branch, you can turn the meaning of the report around. A technical verb always has a subject and a result that must be preserved when paraphrasing.

Repeating on a different path should not be considered a magical way out of the DNR area either. The basic definition refers to any controller in the same NVM subsystem. Therefore, simply changing the controller within it does not in itself refute the expected failure of the same command. Multipath has its own reasons for failover, related to the error class and path state. They need to be read in the appropriate context. An availability policy answers the question of whether a resource is reachable; DNR reports whether retrying the command is appropriate. One useful policy does not erase another.

In this case, the original application task can be broader than one command. The operating system could break a large request into parts, and the application could combine several operations into its own transaction. If one part returns an error, the user’s "retry all" must take into account the fate of the remaining parts. Some may already have completed. The command’s retry hint is not a log of all application effects. To safely repeat a higher level action, it needs its own definition of integrity and completion. One letter in the drive status does not design that model for the application.

It is especially important to distinguish between an erroneous completion and a loss of certainty about completion. If the connection is lost, the host may not receive the expected response and may not know what action has taken place. This is a different situation than a clear answer with DNR. The status that was not received cannot be invented from the general impression of the failure. Recovery from uncertainty requires a prescribed protocol and status check. A simple repeat button can be too clunky an interface if the side effect needs to happen exactly once and its existence has not yet been established.

For normal writing of the same bytes to the same range, the repetition may appear to be idempotent. But the surrounding system is capable of performing additional actions, changing addressing, maintaining a log, or serving concurrent writers. Therefore, the idempotency of an application operation cannot be inferred from the familiar command name alone. Likewise, repeating a read does not guarantee that the same content will be retrieved if the data has changed during the interval. This article does not suggest turning off repetitions: it requires naming the level at which they retain the desired meaning. Only then can recovery policy be honestly discussed.

Failure of one command also does not equal a diagnosis of physical NAND wear and tear. Unsupported parameters, access restrictions, and path conditions can produce errors without evidence of cell corruption. SCT and SC help narrow the subject, additional logs provide other insights. DNR answers its own question about resubmitting. If you turn it into a “disk dead” indicator, you can both prematurely blame the device and miss the real problem in the software request. If we consider zero a sign of health, the error will be mirrored: the possibility of repetition is not a test of the health of the medium.

Application timeout is also not equal to DNR. It reports that a certain waiting interval has expired at the selected level, rather than decoding the controller response that has not yet been received. Several levels may have different timers: the driver continues recovery while the client has stopped waiting. The new client request is then able to coexist with the previous unfinished work below. Therefore, the fault description must preserve the source and scope of each status. This is the only way to understand where they actually decided to stop trying, and where the observer simply gave up waiting, leaving the previous request to the system. Replacing these events with one inscription “the drive prohibited retrying” invents protocol evidence that no one received.

The original status along with the command, time and device context, as well as the version of the decoder used, are useful for storing evidence. But such a set does not give the right to publish user data that could end up in the application’s buffers or logs. In a substantive technical report, it is enough to separate the protocol fields from the task content. In our analysis, all situations are hypothetical, no real commands were sent to the drive, and real error logs are not presented as editorial experience. The meaning of the bits is established by the document and implementation, and not from a fabricated incident.

The interface owner has to decide what to show the person after the driver stops retrying. Sometimes you need to correct the parameters, sometimes you need to save the error for investigation, sometimes you need to suggest an action that will create a new valid request. The universal “try again” obscures the differences between these outcomes. However, a long hexadecimal status alone will not explain the next step to the user. Good wording links an understandable cause to a specific operation while preserving the original diagnostic evidence. This is the task of translating a technical contract, not decorating a button with a warning.

When talking about SSD it is useful to leave the word retry with its exact object. The controller may report that the same command will probably fail again; the host can stop its attempts; the application can choose a different action for the original task. Each decision belongs to its own level and needs its own basis. A responsibly designed retry button appears where its author understands which previous conditions are retained and which ones are changed. Without this understanding, “one more time” means just another request to a system that has already explained the reason for the failure.

Sources & documentation

  1. NVMExpress Base2.0d specification ↗
  2. libnvme status definitions ↗
  3. Linux NVMe host retry handling ↗