From 17005b57568f681532175575e8c44187db91ad59 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 9 Mar 2016 14:29:00 -0700 Subject: [PATCH] nvme: remove nvme_request::timeout field This field is write-only in the current code; the NVMe library does not track timeouts on requests. Change-Id: I50e53bb3c299bf16912c48be8aad3eec829154af Signed-off-by: Daniel Verkamp --- lib/nvme/nvme.c | 1 - lib/nvme/nvme_ctrlr.c | 5 ----- lib/nvme/nvme_internal.h | 1 - test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c | 1 - test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut.c | 1 - test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c | 1 - 6 files changed, 10 deletions(-) diff --git a/lib/nvme/nvme.c b/lib/nvme/nvme.c index b8923ed7bf..c93524f5f6 100644 --- a/lib/nvme/nvme.c +++ b/lib/nvme/nvme.c @@ -149,7 +149,6 @@ nvme_allocate_request(const struct nvme_payload *payload, uint32_t payload_size, memset(req, 0, offsetof(struct nvme_request, children)); req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = true; req->payload = *payload; req->payload_size = payload_size; diff --git a/lib/nvme/nvme_ctrlr.c b/lib/nvme/nvme_ctrlr.c index fce7e91626..5d3cbbe4b6 100644 --- a/lib/nvme/nvme_ctrlr.c +++ b/lib/nvme/nvme_ctrlr.c @@ -664,11 +664,6 @@ nvme_ctrlr_construct_and_submit_aer(struct spdk_nvme_ctrlr *ctrlr, return -1; } - /* - * Disable timeout here, since asynchronous event requests should by - * nature never be timed out. - */ - req->timeout = false; req->cmd.opc = SPDK_NVME_OPC_ASYNC_EVENT_REQUEST; nvme_ctrlr_submit_admin_request(ctrlr, req); diff --git a/lib/nvme/nvme_internal.h b/lib/nvme/nvme_internal.h index 1e09d7f198..5734822c9f 100644 --- a/lib/nvme/nvme_internal.h +++ b/lib/nvme/nvme_internal.h @@ -173,7 +173,6 @@ struct nvme_request { */ struct nvme_payload payload; - uint8_t timeout; uint8_t retries; /** diff --git a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c index 667b3f44ce..50b8ce378c 100644 --- a/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c +++ b/test/lib/nvme/unit/nvme_ctrlr_c/nvme_ctrlr_ut.c @@ -252,7 +252,6 @@ nvme_allocate_request(const struct nvme_payload *payload, uint32_t payload_size, req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = true; } return req; diff --git a/test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut.c b/test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut.c index 3a05154d7d..91ca95e830 100644 --- a/test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut.c +++ b/test/lib/nvme/unit/nvme_ctrlr_cmd_c/nvme_ctrlr_cmd_ut.c @@ -219,7 +219,6 @@ nvme_allocate_request(const struct nvme_payload *payload, uint32_t payload_size, req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = true; return req; } diff --git a/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c b/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c index 65215c5f8c..b214a7ba7b 100644 --- a/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c +++ b/test/lib/nvme/unit/nvme_qpair_c/nvme_qpair_ut.c @@ -147,7 +147,6 @@ nvme_allocate_request(const struct nvme_payload *payload, uint32_t payload_size, memset(req, 0, offsetof(struct nvme_request, children)); req->cb_fn = cb_fn; req->cb_arg = cb_arg; - req->timeout = true; req->payload = *payload; req->payload_size = payload_size;