Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 10:25:17AM -0600, Keith Busch wrote: > On Tue, May 22, 2018 at 12:08:37AM +0800, Ming Lei wrote: > > Please take a look at blk_mq_complete_request(). Even with Bart's > > change, the request still won't be completed by driver. The request can > > only be completed by either

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Tue, May 22, 2018 at 12:08:37AM +0800, Ming Lei wrote: > Please take a look at blk_mq_complete_request(). Even with Bart's > change, the request still won't be completed by driver. The request can > only be completed by either driver or blk-mq, not both. So you're saying blk-mq can't complete a

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 09:59:09AM -0600, Keith Busch wrote: > On Mon, May 21, 2018 at 11:25:43PM +0800, Ming Lei wrote: > > On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > > > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > > > You keep saying that, but the controlle

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Mon, May 21, 2018 at 11:25:43PM +0800, Ming Lei wrote: > On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > > You keep saying that, but the controller state is global to the > > > > controller. It doesn't matter which

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Ming Lei
On Mon, May 21, 2018 at 08:04:13AM -0600, Keith Busch wrote: > On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > > You keep saying that, but the controller state is global to the > > > controller. It doesn't matter which namespace request_queue started the > > > reset: every namespaces

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-21 Thread Keith Busch
On Sat, May 19, 2018 at 08:01:42AM +0800, Ming Lei wrote: > > You keep saying that, but the controller state is global to the > > controller. It doesn't matter which namespace request_queue started the > > reset: every namespaces request queue sees the RESETTING controller state > > When timeouts

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-18 Thread Ming Lei
On Fri, May 18, 2018 at 05:44:08PM -0600, Keith Busch wrote: > On Sat, May 19, 2018 at 06:32:11AM +0800, Ming Lei wrote: > > This way can't sync timeout reliably, since timeout events can > > come from two NS at the same time, and one may be handled as > > RESET_TIMER, and another one can be handle

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-18 Thread Keith Busch
On Sat, May 19, 2018 at 06:32:11AM +0800, Ming Lei wrote: > This way can't sync timeout reliably, since timeout events can > come from two NS at the same time, and one may be handled as > RESET_TIMER, and another one can be handled as EH_HANDLED. You keep saying that, but the controller state is g

Re: [PATCH 1/6] nvme: Sync request queues on reset

2018-05-18 Thread Ming Lei
On Fri, May 18, 2018 at 10:38:18AM -0600, Keith Busch wrote: > This patch fixes races that occur with simultaneous controller > resets by synchronizing request queues prior to initializing the > controller. Withouth this, a thread may attempt disabling a controller > at the same time as we're tryin

[PATCH 1/6] nvme: Sync request queues on reset

2018-05-18 Thread Keith Busch
This patch fixes races that occur with simultaneous controller resets by synchronizing request queues prior to initializing the controller. Withouth this, a thread may attempt disabling a controller at the same time as we're trying to enable it. Signed-off-by: Keith Busch --- drivers/nvme/host/c