From 66a3d5bc47d2973820816226e957db9e85285455 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Wed, 2 Apr 2014 14:19:09 -0700 Subject: target/sbc: Add sbc_dif_generate software emulation This patch adds WRITE_INSERT emulation within target-core using TYPE1 / TYPE3 PI modes in sbc_dif_generate() code. This is useful in order for existing legacy fabrics that do not support protection offloads to interact with backend devices that currently have T10 PI enabled. v2 changes: - Rename to sbc_dif_generate() (Sagi) Cc: Martin K. Petersen Cc: Sagi Grimberg Cc: Or Gerlitz Cc: Quinn Tran Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger --- include/target/target_core_backend.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 7020e33e742..0a36c6cb93b 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h @@ -73,6 +73,7 @@ sense_reason_t sbc_execute_unmap(struct se_cmd *cmd, sense_reason_t (*do_unmap_fn)(struct se_cmd *cmd, void *priv, sector_t lba, sector_t nolb), void *priv); +void sbc_dif_generate(struct se_cmd *); sense_reason_t sbc_dif_verify_write(struct se_cmd *, sector_t, unsigned int, unsigned int, struct scatterlist *, int); sense_reason_t sbc_dif_verify_read(struct se_cmd *, sector_t, unsigned int, -- cgit v1.2.3-18-g5258