Commit b42b6f44 authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Christoph Hellwig

nvme: don't print verbose errors for internal passthrough requests

Use the RQF_QUIET flag to skip the newly added verbose error reporting,
and set the flag in __nvme_submit_sync_cmd, which is used for most
internal passthrough requests where we do expect errors (e.g. due to
probing for optional functionality).  This is similar to what the SCSI
verbose error logging does.
Signed-off-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: default avatarAlan Adamson <alan.adamson@oracle.com>
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Tested-by: default avatarAlan Adamson <alan.adamson@oracle.com>
Tested-by: default avatarYi Zhang <yi.zhang@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 3e3876d3
...@@ -366,7 +366,7 @@ static inline void nvme_end_req(struct request *req) ...@@ -366,7 +366,7 @@ static inline void nvme_end_req(struct request *req)
{ {
blk_status_t status = nvme_error_status(nvme_req(req)->status); blk_status_t status = nvme_error_status(nvme_req(req)->status);
if (unlikely(nvme_req(req)->status != NVME_SC_SUCCESS)) if (unlikely(nvme_req(req)->status && !(req->rq_flags & RQF_QUIET)))
nvme_log_error(req); nvme_log_error(req);
nvme_end_req_zoned(req); nvme_end_req_zoned(req);
nvme_trace_bio_complete(req); nvme_trace_bio_complete(req);
...@@ -1015,6 +1015,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd, ...@@ -1015,6 +1015,7 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
goto out; goto out;
} }
req->rq_flags |= RQF_QUIET;
ret = nvme_execute_rq(req, at_head); ret = nvme_execute_rq(req, at_head);
if (result && ret >= 0) if (result && ret >= 0)
*result = nvme_req(req)->result; *result = nvme_req(req)->result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment