]> git.baikalelectronics.ru Git - kernel.git/commit
target: Add protected fabric + unprotected device support
authorNicholas Bellinger <nab@linux-iscsi.org>
Sat, 28 Feb 2015 06:05:21 +0000 (22:05 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Wed, 8 Apr 2015 06:25:59 +0000 (23:25 -0700)
commit103b42abe283d12895dd3b8a0043b1b1f817f98d
treec5e5727d222617a6c59013f0b597b47e4f3dd9ce
parent356ea1da76932954721e2d2424f19951cdd7d24e
target: Add protected fabric + unprotected device support

This patch adds a new target_core_fabric_ops callback for allowing fabric
drivers to expose a TPG attribute for signaling when a T10-PI protected
fabric wants to function with an un-protected device without T10-PI.

This specifically is to allow LIO to perform WRITE_STRIP + READ_INSERT
operations when functioning with non T10-PI enabled devices, seperate
from any available hw offloads the fabric supports.

This is done using a new se_sess->sess_prot_type that is set at fabric
session creation time based upon the TPG attribute.  It currently cannot
be changed for individual sessions after initial creation.

Also, update existing target_core_sbc.c code to honor sess_prot_type when
setting up cmd->prot_op + cmd->prot_type assignments.

(Add unlikely and !! boolean conversion in sbc_check_prot - Sagi)

Cc: Martin Petersen <martin.petersen@oracle.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Doug Gilbert <dgilbert@interlog.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_sbc.c
drivers/target/target_core_transport.c
include/target/target_core_base.h
include/target/target_core_fabric.h