public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH V2 00/11] nvmet: fixes and some cleanups
@ 2021-02-09  4:08 Chaitanya Kulkarni
  2021-02-09  4:08 ` [PATCH V2 01/11] nvmet: zeroout id-ns buffer for invalid nsid Chaitanya Kulkarni
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-09  4:08 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, Chaitanya Kulkarni, sagi

Hi,

This patch-series fixes behavior for id-ns that is against the spec and
does cleanup for nvmet_find_namespace() to get rid of the duplicate code
and remove the inconsistent error behavior of the host, Also this adds
an helper for unhandled commands to have uniform error message
reporting for the bdev, file and passthru backend. Patch 9/10 fix
compilation warnings. Last patch removes an unnecessary else at the tail
of the nvmet_parse_io_cmd().

This is based on nvme-5.12. All the blktests are seem to pass on this
series.                

Regarding the comment on V1 for bffcd507780e being wrong see [1], we can
continue the discussion.

-ck   

[1] http://lists.infradead.org/pipermail/linux-nvme/2021-February/022637.html

Changes from V1:-

1, In nvmet_execute_identify_ns() zeroout buffer for unallocated nsid.
2. Adjust the patch #2 to reflect above behavior.
3. Merge patch #3 and #4 from V1 to change the nvmet_find_namespace()
   prototype to only accept request.
4. Rename nvmet_find_namespace()->nvmet_req_find_namespace().
5. Remove the backened string print from nvmet_report_invalid_opcode() &
   replace pr_err() with pr_debug().
6. Add a new patch that creates a helper nvmet_req_subsys() to replace
   a chain of the structures all over code to get the subsys from
   nvmet_req.
7. Add a patch to remove the unnecessay else at the tail of the
   nvmet_parse_io_cmd().

Chaitanya Kulkarni (11):
  nvmet: zeroout id-ns buffer for invalid nsid
  nvmet: return uniform error for invalid ns
  nvmet: make nvmet_find_namespace() req based
  nvmet: remove extra variable in id-ns handler
  nvmet: add helper to report invalid opcode
  nvmet: use invalid cmd opcode helper
  nvmet: use invalid cmd opcode helper
  nvmet: use min of device_path and disk len
  nvme-loop: rename variable to get rid of the warn
  nvmet: add nvmet_req_subsys() helper
  nvmet: remove else at the end of the function

 drivers/nvme/target/admin-cmd.c   | 69 +++++++++++++++----------------
 drivers/nvme/target/core.c        | 28 +++++++------
 drivers/nvme/target/io-cmd-bdev.c |  5 +--
 drivers/nvme/target/io-cmd-file.c |  5 +--
 drivers/nvme/target/loop.c        |  2 +-
 drivers/nvme/target/nvmet.h       | 18 +++++++-
 drivers/nvme/target/passthru.c    |  6 +--
 drivers/nvme/target/trace.h       |  4 +-
 8 files changed, 73 insertions(+), 64 deletions(-)

-- 
2.22.1


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2021-02-09  7:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-09  4:08 [PATCH V2 00/11] nvmet: fixes and some cleanups Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 01/11] nvmet: zeroout id-ns buffer for invalid nsid Chaitanya Kulkarni
2021-02-09  7:57   ` Christoph Hellwig
2021-02-09  4:08 ` [PATCH V2 02/11] nvmet: return uniform error for invalid ns Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 03/11] nvmet: make nvmet_find_namespace() req based Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 04/11] nvmet: remove extra variable in id-ns handler Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 05/11] nvmet: add helper to report invalid opcode Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 06/11] nvmet: use invalid cmd opcode helper Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 07/11] " Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 08/11] nvmet: use min of device_path and disk len Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 09/11] nvme-loop: rename variable to get rid of the warn Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 10/11] nvmet: add nvmet_req_subsys() helper Chaitanya Kulkarni
2021-02-09  4:08 ` [PATCH V2 11/11] nvmet: remove else at the end of the function Chaitanya Kulkarni

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