Re: [PATCH v3 3/3] nvme: handle connectivity loss in nvme_set_queue_count
From: Hannes Reinecke
Date: Tue Dec 17 2024 - 04:46:13 EST
On 12/17/24 09:35, Daniel Wagner wrote:
On Fri, Nov 29, 2024 at 12:10:33PM +0100, Hannes Reinecke wrote:
+ /*
+ * It's either a kernel error or the host observed a connection
+ * lost. In either case it's not possible communicate with the
+ * controller and thus enter the error code path.
+ */
+ if (status < 0 || status == NVME_SC_HOST_PATH_ERROR)
return status;
/*
Hmm. Maybe checking for NVME_SC_DNR, too?
if no one complains I'll update the check to:
if (status < 0 || (status > 0 && (status & NVME_STATUS_DNR)) ||
status == NVME_SC_HOST_PATH_ERROR)
return status;
okay?
Which really cries out for a helper. But otherwise okay.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@xxxxxxx +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich