[PATCH 06/10] nvmet: add helper to report invalid opcode
Christoph Hellwig
hch at lst.de
Mon Feb 1 12:29:21 EST 2021
On Sun, Jan 31, 2021 at 09:41:34PM -0800, Chaitanya Kulkarni wrote:
> +static inline u16 nvmet_report_invalid_opcode(struct nvmet_req *req)
> +{
> + char *backend;
> +
> + if (req->ns->bdev)
> + backend = "bdev";
> + else if (req->ns->file)
> + backend = "file";
> + else if (nvmet_req_passthru_ctrl(req))
> + backend = "passthru";
> + else
> + backend = "unknown";
> +
> + pr_err("unhandled cmd %d on qid %d for %s backend\n",
> + req->cmd->common.opcode, req->sq->qid, backend);
I think we can just skip reporting the backend, as this doesn't
really add much value. In fact given that this can be triggered
remotely it should probably be downgraded to a pr_debug.
More information about the Linux-nvme
mailing list