Skip to content

Commit d7ac8dc

Browse files
keithbuschChristoph Hellwig
authored andcommitted
nvme: quiet user passthrough command errors
The driver is spamming the kernel logs for entirely harmless errors from user space submitting unsupported commands. Just silence the errors. The application has direct access to command status, so there's no need to log these. And since every passthrough command now uses the quiet flag, move the setting to the common initializer. Signed-off-by: Keith Busch <[email protected]> Reviewed-by: Alan Adamson <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Reviewed-by: Kanchan Joshi <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Daniel Wagner <[email protected]> Tested-by: Alan Adamson <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent f829230 commit d7ac8dc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

drivers/nvme/host/core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ void nvme_init_request(struct request *req, struct nvme_command *cmd)
675675
if (req->mq_hctx->type == HCTX_TYPE_POLL)
676676
req->cmd_flags |= REQ_POLLED;
677677
nvme_clear_nvme_request(req);
678+
req->rq_flags |= RQF_QUIET;
678679
memcpy(nvme_req(req)->cmd, cmd, sizeof(*cmd));
679680
}
680681
EXPORT_SYMBOL_GPL(nvme_init_request);
@@ -1037,7 +1038,6 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
10371038
goto out;
10381039
}
10391040

1040-
req->rq_flags |= RQF_QUIET;
10411041
ret = nvme_execute_rq(req, at_head);
10421042
if (result && ret >= 0)
10431043
*result = nvme_req(req)->result;
@@ -1227,7 +1227,6 @@ static void nvme_keep_alive_work(struct work_struct *work)
12271227
rq->timeout = ctrl->kato * HZ;
12281228
rq->end_io = nvme_keep_alive_end_io;
12291229
rq->end_io_data = ctrl;
1230-
rq->rq_flags |= RQF_QUIET;
12311230
blk_execute_rq_nowait(rq, false);
12321231
}
12331232

drivers/nvme/host/pci.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,6 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req)
14361436

14371437
abort_req->end_io = abort_endio;
14381438
abort_req->end_io_data = NULL;
1439-
abort_req->rq_flags |= RQF_QUIET;
14401439
blk_execute_rq_nowait(abort_req, false);
14411440

14421441
/*
@@ -2490,7 +2489,6 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
24902489
req->end_io_data = nvmeq;
24912490

24922491
init_completion(&nvmeq->delete_done);
2493-
req->rq_flags |= RQF_QUIET;
24942492
blk_execute_rq_nowait(req, false);
24952493
return 0;
24962494
}

0 commit comments

Comments
 (0)