lib/nvme: Set the parent to failure when submission of any children failed
When one of the children is failed to submit, if any children is already submitted, the function can return success to wait for those children to complete, but the parent should be set to failure. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I2ea53856ee58da991bceca0058d1e1f55d42af37 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2492 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Michael Haeuptle <michaelhaeuptle@gmail.com>
This commit is contained in:
parent
b3d0c369a8
commit
10c4193363
@ -650,9 +650,12 @@ _nvme_qpair_submit_request(struct spdk_nvme_qpair *qpair, struct nvme_request *r
|
||||
|
||||
if (spdk_unlikely(child_req_failed)) {
|
||||
/* part of children requests have been submitted,
|
||||
* return success for this case.
|
||||
* return success since we must wait for those children to complete,
|
||||
* but set the parent request to failure.
|
||||
*/
|
||||
if (req->num_children) {
|
||||
req->cpl.status.sct = SPDK_NVME_SCT_GENERIC;
|
||||
req->cpl.status.sc = SPDK_NVME_SC_INTERNAL_DEVICE_ERROR;
|
||||
return 0;
|
||||
}
|
||||
goto error;
|
||||
|
Loading…
Reference in New Issue
Block a user