* [PATCH] nvme: mark internal passthru request RQF_QUIET
@ 2022-04-19 22:53 Chaitanya Kulkarni
2022-04-20 22:43 ` Alan Adamson
2022-05-10 6:18 ` Christoph Hellwig
0 siblings, 2 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2022-04-19 22:53 UTC (permalink / raw)
To: linux-nvme; +Cc: kbusch, sagi, hch, Chaitanya Kulkarni
Most of the internal passthru commands use __nvme_submit_sync_cmd()
interface. There are few places we open code the request submission :-
1. nvme_keep_alive_work(struct work_struct *work)
2. nvme_timeout(struct request *req, bool reserved)
3. nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
Mark the internal passthru request quiet so that we can skip the verbose
error message from nvme_log_error() in nvme_end_req() completion path,
this will be consistent with what we have in __nvme_submit_sync_cmd().
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
drivers/nvme/host/core.c | 1 +
drivers/nvme/host/pci.c | 2 ++
2 files changed, 3 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index e1846d04817f..c6809045aec3 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -1207,6 +1207,7 @@ static void nvme_keep_alive_work(struct work_struct *work)
rq->timeout = ctrl->kato * HZ;
rq->end_io_data = ctrl;
+ rq->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(rq, false, nvme_keep_alive_end_io);
}
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 3aacf1c0d5a5..f326261456ac 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -1439,6 +1439,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
nvme_init_request(abort_req, &cmd);
abort_req->end_io_data = NULL;
+ abort_req->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(abort_req, false, abort_endio);
/*
@@ -2486,6 +2487,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
req->end_io_data = nvmeq;
init_completion(&nvmeq->delete_done);
+ req->rq_flags |= RQF_QUIET;
blk_execute_rq_nowait(req, false, opcode == nvme_admin_delete_cq ?
nvme_del_cq_end : nvme_del_queue_end);
return 0;
--
2.29.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme: mark internal passthru request RQF_QUIET
2022-04-19 22:53 [PATCH] nvme: mark internal passthru request RQF_QUIET Chaitanya Kulkarni
@ 2022-04-20 22:43 ` Alan Adamson
2022-05-10 6:18 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Alan Adamson @ 2022-04-20 22:43 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: open list:NVM EXPRESS DRIVER, kbusch@kernel.org, sagi@grimberg.me,
hch@lst.de
Reviewed-by: Alan Adamson <alan.adamson@oracle.com>
> On Apr 19, 2022, at 3:53 PM, Chaitanya Kulkarni <kch@nvidia.com> wrote:
>
> Most of the internal passthru commands use __nvme_submit_sync_cmd()
> interface. There are few places we open code the request submission :-
>
> 1. nvme_keep_alive_work(struct work_struct *work)
> 2. nvme_timeout(struct request *req, bool reserved)
> 3. nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
>
> Mark the internal passthru request quiet so that we can skip the verbose
> error message from nvme_log_error() in nvme_end_req() completion path,
> this will be consistent with what we have in __nvme_submit_sync_cmd().
>
> Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
> ---
> drivers/nvme/host/core.c | 1 +
> drivers/nvme/host/pci.c | 2 ++
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index e1846d04817f..c6809045aec3 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1207,6 +1207,7 @@ static void nvme_keep_alive_work(struct work_struct *work)
>
> rq->timeout = ctrl->kato * HZ;
> rq->end_io_data = ctrl;
> + rq->rq_flags |= RQF_QUIET;
> blk_execute_rq_nowait(rq, false, nvme_keep_alive_end_io);
> }
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 3aacf1c0d5a5..f326261456ac 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -1439,6 +1439,7 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
> nvme_init_request(abort_req, &cmd);
>
> abort_req->end_io_data = NULL;
> + abort_req->rq_flags |= RQF_QUIET;
> blk_execute_rq_nowait(abort_req, false, abort_endio);
>
> /*
> @@ -2486,6 +2487,7 @@ static int nvme_delete_queue(struct nvme_queue *nvmeq, u8 opcode)
> req->end_io_data = nvmeq;
>
> init_completion(&nvmeq->delete_done);
> + req->rq_flags |= RQF_QUIET;
> blk_execute_rq_nowait(req, false, opcode == nvme_admin_delete_cq ?
> nvme_del_cq_end : nvme_del_queue_end);
> return 0;
> --
> 2.29.0
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvme: mark internal passthru request RQF_QUIET
2022-04-19 22:53 [PATCH] nvme: mark internal passthru request RQF_QUIET Chaitanya Kulkarni
2022-04-20 22:43 ` Alan Adamson
@ 2022-05-10 6:18 ` Christoph Hellwig
1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-05-10 6:18 UTC (permalink / raw)
To: Chaitanya Kulkarni; +Cc: linux-nvme, kbusch, sagi, hch
Thanks,
applied to nvme-5.19.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-10 6:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-19 22:53 [PATCH] nvme: mark internal passthru request RQF_QUIET Chaitanya Kulkarni
2022-04-20 22:43 ` Alan Adamson
2022-05-10 6:18 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox