diff --git a/src/nvme/types.h b/src/nvme/types.h index 59310ea0..60f412be 100644 --- a/src/nvme/types.h +++ b/src/nvme/types.h @@ -7649,6 +7649,14 @@ struct nvme_mi_vpd_hdr { * @NVME_SC_ADMIN_CMD_MEDIA_NOT_READY: Admin Command Media Not Ready: The Admin * command requires access to media and * the media is not ready. + * @NVME_SC_INVALID_KEY_TAG: The command was aborted due to an invalid KEYTAG + * field value. + * @NVME_SC_HOST_DISPERSED_NS_NOT_ENABLED: The command is prohibited while the + * Host Disperesed Namespace Support (HDISNS) field is not + * set to 1h in the Host Behavior Support feature. + * @NVME_SC_HOST_ID_NOT_INITIALIZED: Host Identifier Not Initialized. + * @NVME_SC_INCORRECT_KEY: The command was aborted due to the key associated + * with the KEYTAG field being incorrect. * @NVME_SC_FDP_DISABLED: Command is not allowed when * Flexible Data Placement is disabled. * @NVME_SC_INVALID_PLACEMENT_HANDLE_LIST: The Placement Handle List is invalid @@ -7672,6 +7680,15 @@ struct nvme_mi_vpd_hdr { * namespace. * @NVME_SC_FORMAT_IN_PROGRESS: Format In Progress: A Format NVM command * is in progress on the namespace. + * @NVME_SC_INVALID_VALUE_SIZE: The value size is not valid. + * @NVME_SC_INVALID_KEY_SIZE: The KV key size is not valid. + * @NVME_SC_KV_KEY_NOT_EXISTS: The Store If Key Exists (SIKE) bit is set to + * '1' in the Store Option field and the KV key does not + * exists. + * @NVME_SC_UNRECOVERED_ERROR: There was an unrecovered error when reading + * from the meidum. + * @NVME_SC_KEY_EXISTS: The Store If No Key Exists (SINKE) bit is set to '1' + * in the Store Option field and the KV key exists. * @NVME_SC_CQ_INVALID: Completion Queue Invalid: The Completion * Queue identifier specified in the command * does not exist. @@ -8029,6 +8046,10 @@ enum nvme_status_field { NVME_SC_TRAN_TPORT_ERROR = 0x22, NVME_SC_PROHIBITED_BY_CMD_AND_FEAT = 0x23, NVME_SC_ADMIN_CMD_MEDIA_NOT_READY = 0x24, + NVME_SC_INVALID_KEY_TAG = 0x25, + NVME_SC_HOST_DISPERSED_NS_NOT_ENABLED = 0x26, + NVME_SC_HOST_ID_NOT_INITIALIZED = 0x27, + NVME_SC_INCORRECT_KEY = 0x28, NVME_SC_FDP_DISABLED = 0x29, NVME_SC_INVALID_PLACEMENT_HANDLE_LIST = 0x2A, NVME_SC_LBA_RANGE = 0x80, @@ -8036,6 +8057,11 @@ enum nvme_status_field { NVME_SC_NS_NOT_READY = 0x82, NVME_SC_RESERVATION_CONFLICT = 0x83, NVME_SC_FORMAT_IN_PROGRESS = 0x84, + NVME_SC_INVALID_VALUE_SIZE = 0x85, + NVME_SC_INVALID_KEY_SIZE = 0x86, + NVME_SC_KV_KEY_NOT_EXISTS = 0x87, + NVME_SC_UNRECOVERED_ERROR = 0x88, + NVME_SC_KEY_EXISTS = 0x89, /* * Command Specific Status Codes: diff --git a/src/nvme/util.c b/src/nvme/util.c index 1af358a3..a6b3bbd0 100644 --- a/src/nvme/util.c +++ b/src/nvme/util.c @@ -52,6 +52,10 @@ static inline __u8 nvme_generic_status_to_errno(__u16 status) case NVME_SC_PRP_INVALID_OFFSET: case NVME_SC_CMB_INVALID_USE: case NVME_SC_KAT_INVALID: + case NVME_SC_INVALID_KEY_TAG: + case NVME_SC_INCORRECT_KEY: + case NVME_SC_INVALID_VALUE_SIZE: + case NVME_SC_INVALID_KEY_SIZE: return EINVAL; case NVME_SC_CMDID_CONFLICT: return EADDRINUSE; @@ -227,11 +231,20 @@ static const char * const generic_status[] = { [NVME_SC_TRAN_TPORT_ERROR] = "Transient Transport Error: A transient transport error was detected", [NVME_SC_PROHIBITED_BY_CMD_AND_FEAT] = "Command Prohibited by Command and Feature Lockdown: The command was aborted due to command execution being prohibited by the Command and Feature Lockdown", [NVME_SC_ADMIN_CMD_MEDIA_NOT_READY] = "Admin Command Media Not Ready: The Admin command requires access to media and the media is not ready", + [NVME_SC_INVALID_KEY_TAG] = "The command was aborted due to an invalid KEYTAG field value", + [NVME_SC_HOST_DISPERSED_NS_NOT_ENABLED] = "The command is prohibited while the Host Disperesed Namespace Support (HDISNS) field is not set to 1h in the Host Behavior Support feature", + [NVME_SC_HOST_ID_NOT_INITIALIZED] = "Host Identifier Not Initialized", + [NVME_SC_INCORRECT_KEY] = "The command was aborted due to the key associated with the KEYTAG field being incorrect", [NVME_SC_LBA_RANGE] = "LBA Out of Range: The command references an LBA that exceeds the size of the namespace", [NVME_SC_CAP_EXCEEDED] = "Capacity Exceeded: Execution of the command has caused the capacity of the namespace to be exceeded", [NVME_SC_NS_NOT_READY] = "Namespace Not Ready: The namespace is not ready to be accessed", [NVME_SC_RESERVATION_CONFLICT] = "Reservation Conflict: The command was aborted due to a conflict with a reservation held on the accessed namespace", [NVME_SC_FORMAT_IN_PROGRESS] = "Format In Progress: A Format NVM command is in progress on the namespace", + [NVME_SC_INVALID_VALUE_SIZE] = "The value size is not valid", + [NVME_SC_INVALID_KEY_SIZE] = "The KV key size is not valid", + [NVME_SC_KV_KEY_NOT_EXISTS] = "The Store If Key Exists (SIKE) bit is set to '1' in the Store Option field and the KV key does not exists", + [NVME_SC_UNRECOVERED_ERROR] = "There was an unrecovered error when reading from the medium", + [NVME_SC_KEY_EXISTS] = "The Store If No Key Exists (SINKE) bit is set to '1' in the Store Option field and the KV key exists", }; static const char * const cmd_spec_status[] = {