From b5b8e2989e3406798dbb88fbb4eaafbbf1a56f6a Mon Sep 17 00:00:00 2001 From: Sagi Grimberg Date: Wed, 19 Feb 2014 17:50:17 +0200 Subject: Target/dif: Introduce protection-passthough-only mode Some transports (iSCSI/iSER/SRP/FC) support hardware INSERT/STRIP capabilities while other transports like loopback/vhost-scsi need perform this is software. This patch allows fabrics using SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC to signal the early LUN scan handling case where PROTECT CDB bits are set, but no fabric buffer has been provided. For transports which use generic new command these buffers have yet to be allocated. Also this way, target may support protection information against legacy initiators (writes are inserted and reads are stripped). (Only set prot_pto for loopback during early special case - nab) Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- include/target/target_core_base.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h index 5ae92492d1ee..82cb4ed06f71 100644 --- a/include/target/target_core_base.h +++ b/include/target/target_core_base.h @@ -570,6 +570,7 @@ struct se_cmd { enum target_prot_ho prot_handover; sense_reason_t pi_err; sector_t bad_sector; + bool prot_pto; }; struct se_ua { -- cgit v1.2.3