Skip to content

Commit 4a20342

Browse files
keithbuschChristoph Hellwig
authored andcommitted
nvmet: remove unsupported command noise
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 <[email protected]> Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Klaus Jensen <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent ce86dad commit 4a20342

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/nvme/target/admin-cmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
307307
case NVME_LOG_ANA:
308308
return nvmet_execute_get_log_page_ana(req);
309309
}
310-
pr_err("unhandled lid %d on qid %d\n",
310+
pr_debug("unhandled lid %d on qid %d\n",
311311
req->cmd->get_log_page.lid, req->sq->qid);
312312
req->error_loc = offsetof(struct nvme_get_log_page_command, lid);
313313
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
@@ -659,7 +659,7 @@ static void nvmet_execute_identify(struct nvmet_req *req)
659659
return nvmet_execute_identify_desclist(req);
660660
}
661661

662-
pr_err("unhandled identify cns %d on qid %d\n",
662+
pr_debug("unhandled identify cns %d on qid %d\n",
663663
req->cmd->identify.cns, req->sq->qid);
664664
req->error_loc = offsetof(struct nvme_identify, cns);
665665
nvmet_req_complete(req, NVME_SC_INVALID_FIELD | NVME_SC_DNR);
@@ -977,7 +977,7 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
977977
return 0;
978978
}
979979

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

0 commit comments

Comments
 (0)