linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Engel, Amit" <Amit.Engel@Dell.com>
To: "linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Cc: "Anner, Ran" <Ran.Anner@dell.com>
Subject: nvme reservation commands during controller reset
Date: Wed, 5 Aug 2020 07:14:22 +0000	[thread overview]
Message-ID: <MN2PR19MB30052441F4F22A4CAC8D396FEE4B0@MN2PR19MB3005.namprd19.prod.outlook.com> (raw)

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

             reply	other threads:[~2020-08-05  7:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-05  7:14 Engel, Amit [this message]
2020-08-09 16:10 ` nvme reservation commands during controller reset 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR19MB30052441F4F22A4CAC8D396FEE4B0@MN2PR19MB3005.namprd19.prod.outlook.com \
    --to=amit.engel@dell.com \
    --cc=Ran.Anner@dell.com \
    --cc=linux-nvme@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).