Commit 619ab1a7 authored by GangCao's avatar GangCao Committed by Jim Harris
Browse files

nvme: no need to send abort notification for died application



Change-Id: I7005159b2c4cc71c249cfdc4adbf8500f006fb1c
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/365646


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent c5a93f35
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -986,6 +986,9 @@ nvme_ctrlr_cleanup_process(struct spdk_nvme_ctrlr_process *proc)
		 *  qpairs to be deleted.
		 */
		qpair->in_completion_context = 0;

		qpair->no_deletion_notification_needed = 1;

		spdk_nvme_ctrlr_free_io_qpair(qpair);
	}

+6 −0
Original line number Diff line number Diff line
@@ -262,6 +262,12 @@ struct spdk_nvme_qpair {
	uint8_t				in_completion_context : 1;
	uint8_t				delete_after_completion_context: 1;

	/*
	 * Set when no deletion notification is needed. For example, the process
	 * which allocated this qpair exited unexpectedly.
	 */
	uint8_t				no_deletion_notification_needed: 1;

	struct spdk_nvme_ctrlr		*ctrlr;

	/* List entry for spdk_nvme_ctrlr::active_io_qpairs */
+6 −4
Original line number Diff line number Diff line
@@ -1474,11 +1474,13 @@ nvme_pcie_ctrlr_delete_io_qpair(struct spdk_nvme_ctrlr *ctrlr, struct spdk_nvme_
		return -1;
	}

	if (qpair->no_deletion_notification_needed == 0) {
		/* Complete any I/O in the completion queue */
		nvme_pcie_qpair_process_completions(qpair, 0);

		/* Abort the rest of the I/O */
		nvme_pcie_qpair_abort_trackers(qpair, 1);
	}

	/* Delete the completion queue */
	status.done = false;
+1 −0
Original line number Diff line number Diff line
@@ -392,6 +392,7 @@ nvme_qpair_init(struct spdk_nvme_qpair *qpair, uint16_t id,

	qpair->in_completion_context = 0;
	qpair->delete_after_completion_context = 0;
	qpair->no_deletion_notification_needed = 0;

	qpair->ctrlr = ctrlr;
	qpair->trtype = ctrlr->trid.trtype;
+1 −1
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ if [ $(uname -s) = Linux ] && [ $SPDK_TEST_NVME_MULTIPROCESS -eq 1 ]; then
	kill -9 $!
	count=0
	while [ $count -le 2 ]; do
		$rootdir/examples/nvme/perf/perf -i 0 -q 1 -w read -s 4096 -t 1 -c 0xf0
		$rootdir/examples/nvme/perf/perf -i 0 -q 1 -w read -s 4096 -t 1 -c 0xf
		count=$(($count + 1))
	done
	count=0