Skip to content

Commit ed4a854

Browse files
keithbuschChristoph Hellwig
authored andcommitted
nvme: warn of unhandled effects only once
We don't need to repeatedly spam the kernel logs with the same warning about unhandled passthrough IO effects. Just one warning is sufficient to observe this condition occurs. Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent f4b9e6c commit ed4a854

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/nvme/host/core.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,9 +1072,9 @@ u32 nvme_command_effects(struct nvme_ctrl *ctrl, struct nvme_ns *ns, u8 opcode)
10721072
if (ns->head->effects)
10731073
effects = le32_to_cpu(ns->head->effects->iocs[opcode]);
10741074
if (effects & ~(NVME_CMD_EFFECTS_CSUPP | NVME_CMD_EFFECTS_LBCC))
1075-
dev_warn(ctrl->device,
1076-
"IO command:%02x has unhandled effects:%08x\n",
1077-
opcode, effects);
1075+
dev_warn_once(ctrl->device,
1076+
"IO command:%02x has unhandled effects:%08x\n",
1077+
opcode, effects);
10781078
return 0;
10791079
}
10801080

0 commit comments

Comments
 (0)