Patch "nvmet: fix Identify Namespace handling" has been added to the 6.2-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

    nvmet: fix Identify Namespace handling

to the 6.2-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:
     nvmet-fix-identify-namespace-handling.patch
and it can be found in the queue-6.2 subdirectory.

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



commit 7b17c29dc6c5df22d1434ec3271094169cdd7854
Author: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
Date:   Wed Mar 15 19:59:35 2023 +0900

    nvmet: fix Identify Namespace handling
    
    [ Upstream commit 8c098aa00118c35108f0c19bd3cdc45e11574948 ]
    
    The identify command with cns set to NVME_ID_CNS_NS does not directly
    depend on the command set. The NVMe specifications is rather confusing
    here as it appears that this command only applies to the NVM command
    set. However, footnote 8 of Figure 273 in the NVMe 2.0 base
    specifications clearly state that this command applies to NVM command
    sets that support logical blocks, that is, NVM and ZNS. Both the NVM and
    ZNS command set specifications also list this identify as mandatory.
    
    The command handling should thus not look at the csi field since it is
    defined as unused for this command. Given that we do not support the
    KV command set, simply remove the csi switch-case for that command
    handling and call directly nvmet_execute_identify_ns() in
    nvmet_execute_identify().
    
    Fixes: ab5d0b38c047 ("nvmet: add Command Set Identifier support")
    Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxxxxxxxxxxxxx>
    Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
    Tested-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/nvme/target/admin-cmd.c b/drivers/nvme/target/admin-cmd.c
index 6a54ed6fb1214..e9b4812930711 100644
--- a/drivers/nvme/target/admin-cmd.c
+++ b/drivers/nvme/target/admin-cmd.c
@@ -692,13 +692,8 @@ static void nvmet_execute_identify(struct nvmet_req *req)
 
 	switch (req->cmd->identify.cns) {
 	case NVME_ID_CNS_NS:
-		switch (req->cmd->identify.csi) {
-		case NVME_CSI_NVM:
-			return nvmet_execute_identify_ns(req);
-		default:
-			break;
-		}
-		break;
+		nvmet_execute_identify_ns(req);
+		return;
 	case NVME_ID_CNS_CS_NS:
 		if (IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
 			switch (req->cmd->identify.csi) {



[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