mirror of https://github.com/xemu-project/xemu.git
hw/block/nvme: default request status to success
Make the default request status NVME_SUCCESS so only error status codes have to be set. Signed-off-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
6a09a3d737
commit
92a10ec17f
|
@ -230,6 +230,7 @@ static void nvme_req_clear(NvmeRequest *req)
|
||||||
{
|
{
|
||||||
req->ns = NULL;
|
req->ns = NULL;
|
||||||
memset(&req->cqe, 0x0, sizeof(req->cqe));
|
memset(&req->cqe, 0x0, sizeof(req->cqe));
|
||||||
|
req->status = NVME_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nvme_req_exit(NvmeRequest *req)
|
static void nvme_req_exit(NvmeRequest *req)
|
||||||
|
@ -546,8 +547,6 @@ static void nvme_process_aers(void *opaque)
|
||||||
result->log_page = event->result.log_page;
|
result->log_page = event->result.log_page;
|
||||||
g_free(event);
|
g_free(event);
|
||||||
|
|
||||||
req->status = NVME_SUCCESS;
|
|
||||||
|
|
||||||
trace_pci_nvme_aer_post_cqe(result->event_type, result->event_info,
|
trace_pci_nvme_aer_post_cqe(result->event_type, result->event_info,
|
||||||
result->log_page);
|
result->log_page);
|
||||||
|
|
||||||
|
@ -626,7 +625,6 @@ static void nvme_rw_cb(void *opaque, int ret)
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
block_acct_done(stats, acct);
|
block_acct_done(stats, acct);
|
||||||
req->status = NVME_SUCCESS;
|
|
||||||
} else {
|
} else {
|
||||||
uint16_t status;
|
uint16_t status;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue