Skip to content

Commit

Permalink
target: Add support for EXTENDED_COPY copy offload emulation
Browse files Browse the repository at this point in the history
This patch adds support for EXTENDED_COPY emulation from SPC-3, that
enables full copy offload target support within both a single virtual
backend device, and across multiple virtual backend devices.  It also
functions independent of target fabric, and supports copy offload
across multiple target fabric ports.

This implemenation supports both EXTENDED_COPY PUSH and PULL models
of operation, so the actual CDB may be received on either source or
desination logical unit.

For Target Descriptors, it currently supports the NAA IEEE Registered
Extended designator (type 0xe4), which allows the reference of target
ports to occur independent of fabric type using EVPD 0x83 WWNs.

For Segment Descriptors, it currently supports copy from block to
block (0x02) mode.

It also honors any present SCSI reservations of the destination target
port.  Note that only Supports No List Identifier (SNLID=1) mode is
supported.

Also included is basic RECEIVE_COPY_RESULTS with service action type
OPERATING PARAMETERS (0x03) required for SNLID=1 operation.

v3 changes:
  - Fix incorrect return type in target_do_receive_copy_results()
    (Fengguang)

v2 changes:
  - Use target_alloc_sgl() instead of transport_generic_get_mem()
  - Convert debug output to use pr_debug()
  - Convert target_xcopy_parse_target_descriptors() NAA IEEN WWN
    dump to use 0x%16phN format specification
  - Drop unnecessary xcopy_pt_cmd->xpt_passthrough_wsem, and
    associated usage in xcopy_pt_write_pending() and
    target_xcopy_issue_pt_cmd()
  - Add check for unsupported EXTENDED_COPY(LID4) service action
    bits in target_do_xcopy()

Cc: Christoph Hellwig <[email protected]>
Cc: Hannes Reinecke <[email protected]>
Cc: Martin Petersen <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Roland Dreier <[email protected]>
Cc: Zach Brown <[email protected]>
Cc: James Bottomley <[email protected]>
Cc: Nicholas Bellinger <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
nablio3000 committed Sep 10, 2013
1 parent 89c12cc commit cbf031f
Show file tree
Hide file tree
Showing 4 changed files with 1,147 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/target/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ target_core_mod-y := target_core_configfs.o \
target_core_spc.o \
target_core_ua.o \
target_core_rd.o \
target_core_stat.o
target_core_stat.o \
target_core_xcopy.o

obj-$(CONFIG_TARGET_CORE) += target_core_mod.o

Expand Down
Loading

0 comments on commit cbf031f

Please sign in to comment.