如果控制器支持有限的CNS(Controller or Namespace Structure)操作,调用nvme_scan_ns_sequential函数按顺序扫描命名空间。 否则,如果命名空间列表扫描失败且返回值中设置了NVME_SC_DNR标志位(表示不可恢复的错误),则调用nvme_scan_ns_sequential函数按顺序扫描命名空间。 释放控制器的扫描锁。 总之,该函数用于在工作队列...
status = fault_inject->status;:从故障注入结构中获取故障注入的状态码。 if (fault_inject->dont_retry):检查故障注入结构中的dont_retry字段是否设置为true,如果是则设置状态码中的NVME_SC_DNR位,表示不应该重试命令。 nvme_req(req)->status = status;:将模拟的状态码设置为请求的状态码,以模拟NVMe命令失败。
Do Not Retry (DNR) 31 More (M) 30 Command Retry Delay (CRD) 29:28 Generic Command Status:0h SCT27:25 Command specific status:1h Media and Data Integrity Errors Definition:2h Path Related Status:3h Reserved:4h to 6h C0h to FFh: Vendor Specific status codes SC24:17 80h to BFh: I/...
NVME_SC_ANA_TRANSITION = 0x303, NVME_SC_DNR = 0x4000, }; 1 change: 1 addition & 0 deletions 1 nvme-builtin.h Original file line numberDiff line numberDiff line change @@ -25,6 +25,7 @@ COMMAND_LIST( ENTRY("fw-log", "Retrieve FW Log, show it", get_fw_log) ENTRY("change...
status = NVME_SC_INVALID_FIELD | NVME_SC_DNR; break; @@ -467,7 +470,7 @@ static void nvmet_execute_get_features(struct nvmet_req *req) u32 cdw10 = le32_to_cpu(req->cmd->common.cdw10[0]); u16 status = 0;switch (cdw10 & 0xf) { ...
此结构用于NVME_COMPLETION_ENTRY的“状态”字段和NVME_ERROR_INFO_LOG的“状态”字段中,以指示已完成的命令的状态。 语法 C++ typedefunion{struct{USHORT P :1; USHORT SC :8; USHORT SCT :3; USHORT Reserved :2; USHORT M :1; USHORT DNR :1; } DUMMYSTRUCTNAME; USHORT AsUshort; } NVME_COMMAND_...
状态代码 (SC)。 CommandStatus.DUMMYSTRUCTNAME.SCT 状态代码类型(SCT)。 CommandStatus.DUMMYSTRUCTNAME.CRD 命令重试延迟(CRD)。 CommandStatus.DUMMYSTRUCTNAME.M 更多(M)。 CommandStatus.DUMMYSTRUCTNAME.DNR 不要重试(DNR)。 CommandStatus.AsUshort
sc = (uint8_t) NVME_STATUS_GET_SC(cpl->status); dnr = NVME_STATUS_GET_DNR(cpl->status); /* * TODO: spec is not clear how commands that are aborted due * to TLER will be marked. So for now, it seems * NAMESPACE_NOT_READY is the only case where we should ...
uint8_t abort_dnr: 1; /* The user is destroying qpair */ uint8_t destroy_in_progress: 1; enum spdk_nvme_transport_type trtype; uint32_t num_outstanding_reqs; /* request object used only for this qpair's FABRICS/CONNECT command (if needed) */ struct nvme_request *reser...
return NVME_SC_INVALID_NS | NVME_SC_DNR; } percpu_ref_get(&req->ns->ref); return NVME_SC_SUCCESS; } 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 这段代码定义了一个名为nvmet_req_find_ns的函数,用于查找并返回与请求相关的命名空间(Namespace)。