Skip to content

tcm: Unify subsystem plugin control CDB emulation

Nicholas A. Bellinger linux-scsi lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 13 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tcm: Move transport_emulate_control_cdb() into __transport_execute_tasks()drivers/target/target_core_file.c drivers/target/target_core_iblock.c drivers/target/target_core_rd.c +1 more+16 -100 replies
2/5tcm: Unify INQUIRY subsystem plugin handlingdrivers/target/target_core_file.c drivers/target/target_core_iblock.c drivers/target/target_core_rd.c +2 more+76 -1097 replies
3/5tcm: Unify READ_CAPACITY_* subsystem plugin handlingdrivers/target/target_core_file.c drivers/target/target_core_iblock.c drivers/target/target_core_rd.c +2 more+42 -970 replies
4/5tcm: Unify UNMAP and WRITE_SAME w/ UNMAP=1 subsystem plugin handlingdrivers/target/target_core_file.c drivers/target/target_core_iblock.c drivers/target/target_core_rd.c +2 more+50 -276 replies
5/5tcm: Unify SYNCHRONIZE_CACHE_* subsystem plugin handlingdrivers/target/target_core_file.c drivers/target/target_core_iblock.c drivers/target/target_core_transport.c +1 more+9 -260 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] tcm: Unify subsystem plugin control CDB emulation

From: Nicholas Bellinger <[email protected]>

Greetings folks,

This patch series pushes the remaining SPC-3 control path CDB emualation for INQUIRY, READ_CAPACITY_*, UNMAP and WRITE_SAME w/ UNMAP=1, and SYNCHRONIZE_CACHE_* subsystem plugin handling into generic TCM code.

It follows Christoph's recommendation to pick off the non SCF_SCSI_DATA_SG_IO_CDB struct se_tasks before hitting struct se_subsysem_api->do_task(), and removal of struct se_subsystem_api_cdb initially added in commit 3712c6da407.

So far this has been tested with TCM/IBLOCK and TCM/FILEIO subsystem plugins on v2.6.36-rc7 x86 HVM with sg_inquiry, sg_readcap, sg_unmap, sg_write_same -[ST] -U, and sg_sync.

Thanks again go out to hch for pushing for IBLOCK and FILEIO to become drivers/scsi independent and save yet another ~80 LOC from the v4.0 tree! Thanks Christoph!!!

Nicholas Bellinger (5):
tcm: Move transport_emulate_control_cdb() into
__transport_execute_tasks()
tcm: Unify INQUIRY subsystem plugin handling
tcm: Unify READ_CAPACITY_* subsystem plugin handling
tcm: Unify UNMAP and WRITE_SAME w/ UNMAP=1 subsystem plugin handling
tcm: Unify SYNCHRONIZE_CACHE_* subsystem plugin handling

 drivers/target/target_core_file.c      |  101 +++++++++++------------------
 drivers/target/target_core_iblock.c    |  113 ++++++++++++--------------------
 drivers/target/target_core_rd.c        |   89 ++++++++-----------------
 drivers/target/target_core_transport.c |  111 ++++++++++++++++---------------
 include/target/target_core_transport.h |   48 ++++++++------
 5 files changed, 193 insertions(+), 269 deletions(-)