linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* nvme reservation commands during controller reset
@ 2020-08-05  7:14 Engel, Amit
  2020-08-09 16:10 ` Keith Busch
  0 siblings, 1 reply; 18+ messages in thread
From: Engel, Amit @ 2020-08-05  7:14 UTC (permalink / raw)
  To: linux-nvme; +Cc: Anner, Ran

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


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-08-18 17:18 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-05  7:14 nvme reservation commands during controller reset Engel, Amit
2020-08-09 16:10 ` Keith Busch
2020-08-10 12:40   ` Christoph Hellwig
2020-08-10 15:13     ` Engel, Amit
2020-08-10 15:48       ` Keith Busch
2020-08-11 20:48         ` Sagi Grimberg
2020-08-12  7:00           ` Engel, Amit
2020-08-14  8:20           ` Christoph Hellwig
2020-08-14 10:09             ` Christoph Hellwig
2020-08-14 16:02               ` Keith Busch
2020-08-15  7:00                 ` Christoph Hellwig
2020-08-14 18:29               ` Sagi Grimberg
2020-08-15  7:01                 ` Christoph Hellwig
2020-08-17  7:56                   ` Sagi Grimberg
2020-08-17  8:12                     ` Christoph Hellwig
2020-08-17 19:29                       ` Sagi Grimberg
2020-08-18  6:36                         ` Christoph Hellwig
2020-08-18 17:18                           ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).