All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V3 0/2] nvme-pci: fix the timeout case when reset is ongoing
@ 2018-01-11  5:07 ` Jianchao Wang
  0 siblings, 0 replies; 35+ messages in thread
From: Jianchao Wang @ 2018-01-11  5:07 UTC (permalink / raw)


Hello

NVME_CTRL_RESETTING used to indicate the range of nvme initializing
strictly in fd634f41(nvme: merge probe_work and reset_work), but it
is not now. The NVME_CTRL_RESETTING is set before queue the
reset_work, there could be a big gap before the reset work handles
the outstanding requests. So when the NVME_CTRL_RESETTING is set,
nvme_timeout will not only meet the admin requests from the
initializing procedure, but also the IO and admin requests from
previous work before nvme_dev_disable is invoked.

To fix this, based on Christoph's suggestion, splits the
NVME_CTRL_RESETTING into NVME_CTRL_RESET_PREPARE
and NVME_CTRL_RESETTING. Before queue the reset work, changes state
to NVME_CTRL_RESET_PREPARE, after disable work completes, changes
state to NVME_CTRL_RESETTING. Then we could distinguish the different
requests and handle them separately. More details, please refer to
the comment of the 2nd patch.

V3:
 - fix wrong reference in loop.c
 - other misc changes

V2:
 - split NVME_CTRL_RESETTING into NVME_CTRL_RESET_PREPARE and
   NVME_CTRL_RESETTING. Introduce new patch based on this.
 - distinguish the requests based on the new state in nvme_timeout
 - change comments of patch

Jianchao Wang(2)
0001-nvme-split-resetting-state-into-reset_prepate-and-re.patch
0002-nvme-pci-fix-the-timeout-case-when-reset-is-ongoing.patch

drivers/nvme/host/core.c   | 17 ++++++++++++++--
drivers/nvme/host/fc.c     |  2 ++
drivers/nvme/host/nvme.h   |  1 +
drivers/nvme/host/pci.c    | 51 +++++++++++++++++++++++++++++++++-------------
drivers/nvme/host/rdma.c   |  8 ++++++++
drivers/nvme/target/loop.c |  5 +++++
6 files changed, 68 insertions(+), 16 deletions(-)

Thanks Jianchao

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

end of thread, other threads:[~2018-01-18  3:25 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11  5:07 [PATCH V3 0/2] nvme-pci: fix the timeout case when reset is ongoing Jianchao Wang
2018-01-11  5:07 ` Jianchao Wang
2018-01-11  5:07 ` [PATCH V3 1/2] nvme: split resetting state into reset_prepate and resetting Jianchao Wang
2018-01-11  5:07   ` Jianchao Wang
2018-01-14  9:48   ` Sagi Grimberg
2018-01-14  9:48     ` Sagi Grimberg
2018-01-15  2:02     ` jianchao.wang
2018-01-15  2:02       ` jianchao.wang
2018-01-15  2:11       ` Keith Busch
2018-01-15  2:11         ` Keith Busch
2018-01-15  2:31         ` jianchao.wang
2018-01-15  2:31           ` jianchao.wang
2018-01-15 13:28     ` Max Gurtovoy
2018-01-15 13:28       ` Max Gurtovoy
2018-01-15 13:36       ` [Suspected-Phishing]Re: " Max Gurtovoy
2018-01-15 13:36         ` Max Gurtovoy
2018-01-16  5:57         ` jianchao.wang
2018-01-16  5:57           ` jianchao.wang
2018-01-16  7:52           ` jianchao.wang
2018-01-16  7:52             ` jianchao.wang
2018-01-17 10:37           ` Sagi Grimberg
2018-01-17 10:37             ` Sagi Grimberg
2018-01-17 10:50             ` Max Gurtovoy
2018-01-17 12:02               ` Sagi Grimberg
2018-01-17 12:02                 ` Sagi Grimberg
2018-01-17 21:08             ` James Smart
2018-01-17 21:08               ` James Smart
2018-01-18  3:24               ` jianchao.wang
2018-01-18  3:24                 ` jianchao.wang
2018-01-15 14:07       ` jianchao.wang
2018-01-15 14:07         ` jianchao.wang
2018-01-11  5:07 ` [PATCH V3 2/2] nvme-pci: fix the timeout case when reset is ongoing Jianchao Wang
2018-01-11  5:07   ` Jianchao Wang
2018-01-14  9:49   ` Sagi Grimberg
2018-01-14  9:49     ` Sagi Grimberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.