Patch "nvme: handle connectivity loss in nvme_set_queue_count" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    nvme: handle connectivity loss in nvme_set_queue_count

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     nvme-handle-connectivity-loss-in-nvme_set_queue_coun.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8b524a2422b70d7d8de8b21cb9f764c2dddd711a
Author: Daniel Wagner <wagi@xxxxxxxxxx>
Date:   Thu Jan 9 14:30:48 2025 +0100

    nvme: handle connectivity loss in nvme_set_queue_count
    
    [ Upstream commit 294b2b7516fd06a8dd82e4a6118f318ec521e706 ]
    
    When the set feature attempts fails with any NVME status code set in
    nvme_set_queue_count, the function still report success. Though the
    numbers of queues set to 0. This is done to support controllers in
    degraded state (the admin queue is still up and running but no IO
    queues).
    
    Though there is an exception. When nvme_set_features reports an host
    path error, nvme_set_queue_count should propagate this error as the
    connectivity is lost, which means also the admin queue is not working
    anymore.
    
    Fixes: 9a0be7abb62f ("nvme: refactor set_queue_count")
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Hannes Reinecke <hare@xxxxxxx>
    Reviewed-by: Sagi Grimberg <sagi@xxxxxxxxxxx>
    Signed-off-by: Daniel Wagner <wagi@xxxxxxxxxx>
    Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 26e3f1896dc39..8a200931bc297 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1553,7 +1553,13 @@ int nvme_set_queue_count(struct nvme_ctrl *ctrl, int *count)
 
 	status = nvme_set_features(ctrl, NVME_FEAT_NUM_QUEUES, q_count, NULL, 0,
 			&result);
-	if (status < 0)
+
+	/*
+	 * 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;
 
 	/*




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux