Skip to content

Commit 3851a86

Browse files
keithbuschgregkh
authored andcommitted
nvmet: remove unsupported command noise
[ Upstream commit 4a20342 ] Nothing can stop a host from submitting invalid commands. The target just needs to respond with an appropriate status, but that's not a target error. Demote invalid command messages to the debug level so these events don't spam the kernel logs. Reported-by: Yi Zhang <yi.zhang@redhat.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Klaus Jensen <k.jensen@samsung.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 86587f3 commit 3851a86

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/nvme/target/admin-cmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
313313
case NVME_LOG_ANA:
314314
return nvmet_execute_get_log_page_ana(req);
315315
}
316-
pr_err("unhandled lid %d on qid %d\n",
316+
pr_debug("unhandled lid %d on qid %d\n",
317317
req->cmd->get_log_page.lid, req->sq->qid);
318318
req->error_loc = offsetof(struct nvme_get_log_page_command, lid);
319319
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
@@ -657,7 +657,7 @@ static void nvmet_execute_identify(struct nvmet_req *req)
657657
return nvmet_execute_identify_desclist(req);
658658
}
659659

660-
pr_err("unhandled identify cns %d on qid %d\n",
660+
pr_debug("unhandled identify cns %d on qid %d\n",
661661
req->cmd->identify.cns, req->sq->qid);
662662
req->error_loc = offsetof(struct nvme_identify, cns);
663663
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
@@ -972,7 +972,7 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
972972
return 0;
973973
}
974974

975-
pr_err("unhandled cmd %d on qid %d\n", cmd->common.opcode,
975+
pr_debug("unhandled cmd %d on qid %d\n", cmd->common.opcode,
976976
req->sq->qid);
977977
req->error_loc = offsetof(struct nvme_common_command, opcode);
978978
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;

0 commit comments

Comments
 (0)