summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_transport.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-02-08 04:02:08 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2015-04-07 23:27:23 -0700
commit72c0385014a140b6029c5c8bf88efb9ad166ae48 (patch)
treec304627da07f6ff6c4282ebd267293b543977fee /drivers/target/target_core_transport.c
parentfdeab852983249fd1b8859f8bf54a5bfd8581c90 (diff)
downloadlinux-stable-72c0385014a140b6029c5c8bf88efb9ad166ae48.tar.gz
linux-stable-72c0385014a140b6029c5c8bf88efb9ad166ae48.tar.bz2
linux-stable-72c0385014a140b6029c5c8bf88efb9ad166ae48.zip
target: Add internal READ_INSERT support
This patch adds READ_INSERT support in target_read_prot_action() that invokes sbc_dif_generate() when LIO is responsible for generating the outgoing T10-PI. Required for supporting fabrics that exchange protection information, and would like to function with un-protected devices. Reviewed-by: Martin Petersen <martin.petersen@oracle.com> Reviewed-by: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_transport.c')
-rw-r--r--drivers/target/target_core_transport.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index bfdd6237a3d1..b671ebbe1df6 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -1994,6 +1994,12 @@ static bool target_read_prot_action(struct se_cmd *cmd)
}
}
break;
+ case TARGET_PROT_DIN_INSERT:
+ if (cmd->se_sess->sup_prot_ops & TARGET_PROT_DIN_INSERT)
+ break;
+
+ sbc_dif_generate(cmd);
+ break;
default:
break;
}