nvme reservation commands during controller reset
Engel, Amit
Amit.Engel at Dell.com
Wed Aug 5 03:14:22 EDT 2020
Hello,
We test nvme reservation commands while controller reset and encounter a problem
The reservation cmd during controller reset fails on the host side with error code 0x370 (NVME_SC_HOST_PATH_ERROR)
based on the host code, nvme cli/ioctl commands are marked for failfast (no retry)
This is also the case for block layer user space API for persistent reservations (for example: IOC_PR_RESERVE)
host/core.c 'nvme_alloc_request' set the flag
req->cmd_flags |= REQ_FAILFAST_DRIVER
In case of path failover, the host will fail the cmd with status NVME_SC_HOST_PATH_ERROR
host/fabrics.c:
blk_status_t nvmf_fail_nonready_command(struct nvme_ctrl *ctrl,
>------->-------struct request *rq)
{
>-------if (ctrl->state != NVME_CTRL_DELETING &&
>------- ctrl->state != NVME_CTRL_DEAD &&
>------- !blk_noretry_request(rq) && !(rq->cmd_flags & REQ_NVME_MPATH))
>------->-------return BLK_STS_RESOURCE;
>-------nvme_req(rq)->status = NVME_SC_HOST_PATH_ERROR;
>-------blk_mq_start_request(rq);
>-------nvme_complete_rq(rq);
>-------return BLK_STS_OK;
}
What is the reason for setting REQ_FAILFAST_DRIVER flag in nvme_alloc_request ?
The original intention was to mark only sync cmds as failfast ?
Thanks
Amit Engel
More information about the Linux-nvme
mailing list