target: Add internal READ_INSERT support
authorNicholas Bellinger <nab@linux-iscsi.org>
Sun, 8 Feb 2015 12:02:08 +0000 (04:02 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Apr 2015 06:27:23 +0000 (23:27 -0700)
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>
drivers/target/target_core_transport.c

index bfdd6237a3d1aa251aaafb074c0bb7cb5d50581d..b671ebbe1df621c2173d01afa83dce56291ce3d7 100644 (file)
@@ -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;
        }
This page took 0.026203 seconds and 5 git commands to generate.