lib/nvmf: Add three variables to spdk_nvmf_request to avoid temp context for abort operation

Add three variables, poller, timeout_tsc, and req_to_abort to
struct spdk_nvmf_request to wait until the request to abort is
abortable without using any dynamically allocated context.

struct spdk_nvmf_request is already very large (968 bytes), and
the pahole tool checked these variables did not create any extra hole.

Poller pointer and timeout value are usable for other potential
cases, and so use generic names.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I7202ade181365ab586d8c30383b3ea0fef82dcff
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3260
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2020-07-09 09:53:48 +09:00 committed by Tomasz Zawadzki
parent 604b4503c4
commit a7d59c9d75

View File

@ -94,6 +94,9 @@ struct spdk_nvmf_request {
struct spdk_nvmf_dif_info dif;
spdk_nvmf_nvme_passthru_cmd_cb cmd_cb_fn;
struct spdk_nvmf_request *first_fused_req;
struct spdk_nvmf_request *req_to_abort;
struct spdk_poller *poller;
uint64_t timeout_tsc;
STAILQ_ENTRY(spdk_nvmf_request) buf_link;
TAILQ_ENTRY(spdk_nvmf_request) link;