Thread (19 messages) 19 messages, 3 authors, 2021-02-26

Re: [PATCH 6/6] nvme: return -ETIMEDOUT in nvme_submit_sync_cmd()

From: Hannes Reinecke <hare@suse.de>
Date: 2021-02-25 17:29:16

On 2/25/21 5:31 PM, Keith Busch wrote:
On Thu, Feb 25, 2021 at 11:55:27AM +0100, Hannes Reinecke wrote:
quoted
When a command times out we should be returning -ETIMEDOUT in
nvme_submit_sync_cmd(), and not requiring the caller to guess whether
a specific NVMe status should be interpreted as a timeout.
This driver has been using -EINTR for this condition since the
beginning, though. Is there a reason I'm not seeing why these use cases
can't use the existing command cancelled flag?
  
Technically we have two distinct conditions, a command being aborted due 
to a timeout, and a command being aborted due to a queue disconnect.
Admittedly, the second conditions is the common case, as the queue 
disconnect is typically done due to the error recovery kicking in, which 
in itself is in reaction to a KATO timeout firing.
The first condition is only hit if we run into a timeout for the initial 
commands _before_ KATO is started.

And I thought it might be good to have these two cases differentiated.
But I'd be fine with dropping it if that's not needed.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help