linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] nvme: quiet user passthrough command errors
@ 2022-10-27 15:04 ` Keith Busch
  2022-10-27 15:31   ` Daniel Wagner
  2022-10-28  5:23   ` Kanchan Joshi
  0 siblings, 2 replies; 3+ messages in thread
From: Keith Busch @ 2022-10-27 15:04 UTC (permalink / raw)
  To: linux-nvme
  Cc: hch, sagi, chaitanyak, joshi.k, axboe, Keith Busch,
	Daniel Wagner, Alan Adamson

From: Keith Busch <kbusch@kernel.org>

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 <dwagner@suse.de>
Cc: Alan Adamson <alan.adamson@oracle.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
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(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 686c55cb5d1a..543782dcfba9 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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);
 }
 
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] nvme: quiet user passthrough command errors
  2022-10-27 15:04 ` [PATCHv2] nvme: quiet user passthrough command errors Keith Busch
@ 2022-10-27 15:31   ` Daniel Wagner
  2022-10-28  5:23   ` Kanchan Joshi
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Wagner @ 2022-10-27 15:31 UTC (permalink / raw)
  To: Keith Busch
  Cc: linux-nvme, hch, sagi, chaitanyak, joshi.k, axboe, Keith Busch,
	Alan Adamson

On Thu, Oct 27, 2022 at 08:04:17AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> 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 <dwagner@suse.de>
> Cc: Alan Adamson <alan.adamson@oracle.com>
> Signed-off-by: Keith Busch <kbusch@kernel.org>

Reviewed-by: Daniel Wagner <dwagner@suse.de>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCHv2] nvme: quiet user passthrough command errors
  2022-10-27 15:04 ` [PATCHv2] nvme: quiet user passthrough command errors Keith Busch
  2022-10-27 15:31   ` Daniel Wagner
@ 2022-10-28  5:23   ` Kanchan Joshi
  1 sibling, 0 replies; 3+ messages in thread
From: Kanchan Joshi @ 2022-10-28  5:23 UTC (permalink / raw)
  To: Keith Busch
  Cc: linux-nvme, hch, sagi, chaitanyak, axboe, Keith Busch,
	Daniel Wagner, Alan Adamson

[-- Attachment #1: Type: text/plain, Size: 856 bytes --]

On Thu, Oct 27, 2022 at 08:04:17AM -0700, Keith Busch wrote:
>From: Keith Busch <kbusch@kernel.org>
>
>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 <dwagner@suse.de>
>Cc: Alan Adamson <alan.adamson@oracle.com>
>Signed-off-by: Keith Busch <kbusch@kernel.org>
>---
>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 <joshi.k@samsung.com>


[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-10-28  5:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20221027151545epcas5p4b0d216b828a5c33ec15ff84e7f847e52@epcas5p4.samsung.com>
2022-10-27 15:04 ` [PATCHv2] nvme: quiet user passthrough command errors Keith Busch
2022-10-27 15:31   ` Daniel Wagner
2022-10-28  5:23   ` Kanchan Joshi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).