diff --git a/include/spdk/nvme.h b/include/spdk/nvme.h index 0fd3f4e827..9c920e4697 100644 --- a/include/spdk/nvme.h +++ b/include/spdk/nvme.h @@ -386,9 +386,9 @@ struct spdk_nvme_qpair; * Signature for the callback function invoked when a timeout is * detected on a request. */ -typedef void (*spdk_nvme_timeout_cb)(struct spdk_nvme_ctrlr *ctrlr, - struct spdk_nvme_qpair *qpair, - void *cb_arg); +typedef void (*spdk_nvme_timeout_cb)(void *cb_arg, + struct spdk_nvme_ctrlr *ctrlr, + struct spdk_nvme_qpair *qpair); /** * \brief Register for timeout callback on a controller. diff --git a/lib/bdev/nvme/blockdev_nvme.c b/lib/bdev/nvme/blockdev_nvme.c index b3021373dc..b61ebe9ff9 100644 --- a/lib/bdev/nvme/blockdev_nvme.c +++ b/lib/bdev/nvme/blockdev_nvme.c @@ -500,8 +500,8 @@ probe_cb(void *cb_ctx, const struct spdk_nvme_transport_id *trid, } static void -blockdev_nvme_timeout_cb(struct spdk_nvme_ctrlr *ctrlr, - struct spdk_nvme_qpair *qpair, void *cb_arg) +blockdev_nvme_timeout_cb(void *cb_arg, struct spdk_nvme_ctrlr *ctrlr, + struct spdk_nvme_qpair *qpair) { int rc; diff --git a/lib/nvme/nvme_pcie.c b/lib/nvme/nvme_pcie.c index 681dcaf985..7982fa1f82 100644 --- a/lib/nvme/nvme_pcie.c +++ b/lib/nvme/nvme_pcie.c @@ -1841,7 +1841,7 @@ nvme_pcie_qpair_check_timeout(struct spdk_nvme_qpair *qpair) * Request has timed out. This could be i/o or admin request. * Call the registered timeout function for user to take action. */ - ctrlr->timeout_cb_fn(ctrlr, qpair, ctrlr->timeout_cb_arg); + ctrlr->timeout_cb_fn(ctrlr->timeout_cb_arg, ctrlr, qpair); } }