Skip to content

Commit 7a4ffd2

Browse files
ChaitanayaKulkarniChristoph Hellwig
authored andcommitted
nvmet: demote fabrics cmd parse err msg to debug
Host can send invalid commands and flood the target with error messages. Demote the error message from pr_err() to pr_debug() in nvmet_parse_fabrics_cmd() and nvmet_parse_connect_cmd(). Signed-off-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 4c2dab2 commit 7a4ffd2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/nvme/target/fabrics-cmd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ u16 nvmet_parse_fabrics_cmd(struct nvmet_req *req)
9494
req->execute = nvmet_execute_prop_get;
9595
break;
9696
default:
97-
pr_err("received unknown capsule type 0x%x\n",
97+
pr_debug("received unknown capsule type 0x%x\n",
9898
cmd->fabrics.fctype);
9999
req->error_loc = offsetof(struct nvmf_common_command, fctype);
100100
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
@@ -284,13 +284,13 @@ u16 nvmet_parse_connect_cmd(struct nvmet_req *req)
284284
struct nvme_command *cmd = req->cmd;
285285

286286
if (!nvme_is_fabrics(cmd)) {
287-
pr_err("invalid command 0x%x on unconnected queue.\n",
287+
pr_debug("invalid command 0x%x on unconnected queue.\n",
288288
cmd->fabrics.opcode);
289289
req->error_loc = offsetof(struct nvme_common_command, opcode);
290290
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
291291
}
292292
if (cmd->fabrics.fctype != nvme_fabrics_type_connect) {
293-
pr_err("invalid capsule type 0x%x on unconnected queue.\n",
293+
pr_debug("invalid capsule type 0x%x on unconnected queue.\n",
294294
cmd->fabrics.fctype);
295295
req->error_loc = offsetof(struct nvmf_common_command, fctype);
296296
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;

0 commit comments

Comments
 (0)