Skip to contentSkip to conversation

nvme: quiet user passthrough command errors

PATCH Superseded Keith Busch 3 participants 3 messages Oct 27, 2022 – Oct 28, 2022 NVMe

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nvme: quiet user passthrough command errors

From: Keith Busch <[email protected]>

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 wants the quiet flag, move the setting to every user's common initializer.

Cc Daniel Wagner <[email protected]>
Cc Alan Adamson <[email protected]>

---
v1->v2:

Set the quiet flag in the common initializer instead of open coding the flag for each path.

 drivers/nvme/host/core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/nvme/host/core.c +1 -3
index 686c55cb5d1a..543782dcfba9 100644
@@ -657,7 +657,7 @@ static inline void nvme_clear_nvme_request(struct request *req)
 	nvme_req(req)->status = 0;
 	nvme_req(req)->retries = 0;
 	nvme_req(req)->flags = 0;
-	req->rq_flags |= RQF_DONTPREP;
+	req->rq_flags |= RQF_DONTPREP | RQF_QUIET;
 }
 
 /* initialize a passthrough request */
@@ -1037,7 +1037,6 @@ int __nvme_submit_sync_cmd(struct request_queue *q, struct nvme_command *cmd,
 			goto out;
 	}
 
-	req->rq_flags |= RQF_QUIET;
 	ret = nvme_execute_rq(req, at_head);
 	if (result && ret >= 0)
 		*result = nvme_req(req)->result;
@@ -1226,7 +1225,6 @@ static void nvme_keep_alive_work(struct work_struct *work)
 	rq->timeout = ctrl->kato * HZ;
 	rq->end_io = nvme_keep_alive_end_io;
 	rq->end_io_data = ctrl;
-	rq->rq_flags |= RQF_QUIET;
 	blk_execute_rq_nowait(rq, false);
 }
 
Signature · 1 line
2.30.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 7 lines · Keith Busch

From: Keith Busch <[email protected]>

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.

Quoted 6 lines

And since every passthrough command wants the quiet flag, move the setting to every user's common initializer.

Cc Daniel Wagner <[email protected]>
Cc Alan Adamson <[email protected]>
#2 lore raw
In reply to Keith Busch
Quoted 10 lines · Keith Busch

From: Keith Busch <[email protected]>

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 wants the quiet flag, move the setting to every user's common initializer.

Quoted 8 lines
Cc Daniel Wagner <[email protected]>
Cc Alan Adamson <[email protected]>

---
v1->v2:

Set the quiet flag in the common initializer instead of open coding the flag for each path.

now open coding can be removed in pci.c too. That is still being done at two places.

With those changes in - Reviewed-by: Kanchan Joshi <[email protected]>