Skip to content

Remove data_len field from the nvmet_req struct

Logan Gunthorpe linux-nvme lkml 1 version Applied

Status from this message: Thanks, applied to nvme-5.5 with the requested author attribution.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 10 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/7nvmet-tcp: Don't check data_len in nvmet_tcp_map_data()drivers/nvme/target/tcp.c+1 -11 reply
2/7nvmet-tcp: Don't set the request's data_lendrivers/nvme/target/tcp.c+2 -41 reply
3/7nvmet: Introduce common execute function for get_log_page and identifydrivers/nvme/target/admin-cmd.c+50 -435 replies
4/7nvmet: Cleanup discovery execute handlersdrivers/nvme/target/discovery.c+19 -250 replies
5/7nvmet: Introduce nvmet_dsm_len() helperdrivers/nvme/target/io-cmd-file.c drivers/nvme/target/nvmet.h+7 -21 reply
6/7nvmet: Remove the data_len field from the nvmet_req structdrivers/nvme/target/admin-cmd.c drivers/nvme/target/core.c drivers/nvme/target/discovery.c +4 more+86 -390 replies
7/7nvmet: Open code nvmet_req_execute()drivers/nvme/target/core.c drivers/nvme/target/fc.c drivers/nvme/target/loop.c +3 more+8 -151 reply

Reviews trailers per patch

5 of 7 patches have a Reviewed-by or Acked-by.

PatchSagi GrimbergChaitanya KulkarniChristoph Hellwig
1/7R-b R-b
2/7R-b
3/7R-b
4/7
5/7R-b
6/7
7/7R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/7] Remove data_len field from the nvmet_req struct

Hi,

This patchset is a cleanup in preparation for the passthru patchset. The aim is to remove the data_len field in the nvmet_req struct and instead just check the length is appropriate inside the execute handlers. This is more appropriate for passthru which may have commands with unknown lengths (like Vendor Specific Commands). It's also in improvement seeing it can often be confusing when it's best to use the data_len field over the transfer_len field. The first two patches in this series remove some questionable uses of the data_len field in nvmt-tcp

Most of this patchset was extracted from a draft patch from Christoph[1].

The series is based on v5.4-rc4 and a git branch is available here:

https://github.com/sbates130272/linux-p2pmem/branches nvmet_data_len

Logan

[1] https://lore.kernel.org/linux-block/[email protected]/

--

Logan Gunthorpe (7):
nvmet-tcp: Don't check data_len in nvmet_tcp_map_data()
nvmet-tcp: Don't set the request's data_len
nvmet: Introduce common execute function for get_log_page and identify
nvmet: Cleanup discovery execute handlers
nvmet: Introduce nvmet_dsm_len() helper
nvmet: Remove the data_len field from the nvmet_req struct
nvmet: Open code nvmet_req_execute()

 drivers/nvme/target/admin-cmd.c   | 128 +++++++++++++++++-------------
 drivers/nvme/target/core.c        |  12 +--
 drivers/nvme/target/discovery.c   |  62 +++++++--------
 drivers/nvme/target/fabrics-cmd.c |  15 +++-
 drivers/nvme/target/fc.c          |   4 +-
 drivers/nvme/target/io-cmd-bdev.c |  19 +++--
 drivers/nvme/target/io-cmd-file.c |  20 +++--
 drivers/nvme/target/loop.c        |   2 +-
 drivers/nvme/target/nvmet.h       |  10 ++-
 drivers/nvme/target/rdma.c        |   4 +-
 drivers/nvme/target/tcp.c         |  14 ++--
 11 files changed, 167 insertions(+), 123 deletions(-)

--
2.20.1