nvme: clarify required action when free_io_qpair fails
A very heinous error case is when a delete_io_sq or delete_io_cq command fails when freeing a PCIe IO qpair. In that case we return an error to the caller, and the resources are not freed. Instead of trying to 'fix' this error case, let's just tell the user that if freeing an IO qpair fails, the user should reset the controller and try again. Resetting the controller will do one of two things: 1) The subsequent create_cq/create_sq will succeed, at which point, trying to delete again should work fine. (If it doesn't, it indicates some kind of horrendous SSD.) 2) The subsequent create_cq/create_sq will fail, at which point the entire ctrlr would fail and need to be detached. This could result in some leaked memory, but seems unavoidable. Closes issue #716. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I218564080abec4d6b5ac0b861869ebfc7d99f2c3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6918 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: <dongx.yi@intel.com>
This commit is contained in:
parent
6156777bd4
commit
8f5e4bfe2e
@ -1410,7 +1410,8 @@ spdk_nvme_qp_failure_reason spdk_nvme_ctrlr_get_admin_qp_failure_reason(
|
||||
*
|
||||
* \param qpair I/O queue pair to free.
|
||||
*
|
||||
* \return 0 on success, -1 on failure.
|
||||
* \return 0 on success, -1 on failure. On failure, the caller should reset
|
||||
* the controller and try to free the io qpair again after the reset.
|
||||
*/
|
||||
int spdk_nvme_ctrlr_free_io_qpair(struct spdk_nvme_qpair *qpair);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user