public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 0/5] nvme: rework __nvme_submit_sync_cmd()
@ 2023-02-09 14:38 Hannes Reinecke
  2023-02-09 14:38 ` [PATCH 1/5] nvme: split __nvme_submit_sync_cmd() Hannes Reinecke
                   ` (4 more replies)
  0 siblings, 5 replies; 22+ messages in thread
From: Hannes Reinecke @ 2023-02-09 14:38 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Sagi Grimberg, Keith Busch, linux-nvme, Hannes Reinecke

Hi all,

as Jens and hch complained about the argument list to __nvme_submit_sync_cmd()
getting too long, here's now a patchset to clean things up.
The first patch is to split off nvme_alloc_request() from
__nvme_submit_sync_cmd(), which serves to reduce the number of arguments;
it's also a nice cleanup as this function can be utilized to replace some
open-coded versions.
Then a patch to allow blk_rq_map_kern() to accept a NULL pointer; that's
really trivial and simplifies caller handling.
The third one again is pretty simple, and moves the 'result' handling into
nvme_execute_rq(), rather than leave it with the caller.
And with that we can open-code __nvme_submit_sync_cmd() in the callers,
and drop the function altogether.
The last patch to allow for retries of the authentication commands is
then pretty simple.

As usual, comments and reviews are welcome.

Hannes Reinecke (5):
  nvme: split __nvme_submit_sync_cmd()
  block: make blk_rq_map_kern() to accept a NULL buffer
  nvme: move result handling into nvme_execute_rq()
  nvme: open-code __nvme_submit_sync_cmd()
  nvme: retry authentication commands if DNR status bit is not set

 block/blk-map.c                |  2 +-
 drivers/block/pktcdvd.c        | 10 ++--
 drivers/nvme/host/auth.c       | 31 ++++++++---
 drivers/nvme/host/core.c       | 96 +++++++++++++++++++++-------------
 drivers/nvme/host/fabrics.c    | 62 +++++++++++++++++-----
 drivers/nvme/host/ioctl.c      |  5 +-
 drivers/nvme/host/nvme.h       |  9 ++--
 drivers/nvme/host/pci.c        |  8 ++-
 drivers/nvme/target/passthru.c |  6 +--
 drivers/scsi/scsi_ioctl.c      |  8 ++-
 drivers/scsi/scsi_lib.c        | 11 ++--
 11 files changed, 155 insertions(+), 93 deletions(-)

-- 
2.35.3



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

end of thread, other threads:[~2023-02-14  9:39 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-09 14:38 [PATCH 0/5] nvme: rework __nvme_submit_sync_cmd() Hannes Reinecke
2023-02-09 14:38 ` [PATCH 1/5] nvme: split __nvme_submit_sync_cmd() Hannes Reinecke
2023-02-13  6:19   ` Christoph Hellwig
2023-02-13  9:47     ` Sagi Grimberg
2023-02-09 14:38 ` [PATCH 2/5] block: make blk_rq_map_kern() to accept a NULL buffer Hannes Reinecke
2023-02-13  6:21   ` Christoph Hellwig
2023-02-13  9:49   ` Sagi Grimberg
2023-02-09 14:38 ` [PATCH 3/5] nvme: move result handling into nvme_execute_rq() Hannes Reinecke
2023-02-13  9:59   ` Sagi Grimberg
2023-02-13 10:04     ` Hannes Reinecke
2023-02-13 10:08       ` Sagi Grimberg
2023-02-09 14:38 ` [PATCH 4/5] nvme: open-code __nvme_submit_sync_cmd() Hannes Reinecke
2023-02-13  6:26   ` Christoph Hellwig
2023-02-13 10:07     ` Sagi Grimberg
2023-02-09 14:38 ` [PATCH 5/5] nvme: retry authentication commands if DNR status bit is not set Hannes Reinecke
2023-02-13 10:14   ` Sagi Grimberg
2023-02-13 10:28     ` Hannes Reinecke
2023-02-13 10:33       ` Sagi Grimberg
2023-02-13 13:24         ` Hannes Reinecke
2023-02-13 13:47           ` Sagi Grimberg
2023-02-13 14:07             ` Hannes Reinecke
2023-02-14  9:39               ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox