[PATCH-v2 02/15] target: Add protected fabric + unprotected device support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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

[PATCH-v2 01/15] target: Convert DIF emulation to use cmd-prot_type

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch changes existing DIF emulation to check the command descriptor's prot_type, instead of what the backend device is exposing in pi_prot_type. Since this value is already set in sbc_check_prot(), go ahead and use it to allow protected fabrics

[PATCH-v2 00/15] target: Add WRITE_STRIP + READ_INSERT support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi MKP, Sagi, Quinn, Co, Here is -v2 for adding target internal WRITE_STRIP + READ_INSERT DIX emulation using target_core_sbc.c + crct10dif.ko code. This mode is for allowing T10-PI capable fabrics to interoperate with backend devices that have not

[PATCH-v2 08/15] target/file: Add checks for backend DIF emulation

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Make sure that FILEIO only attempts to use backend DIF emulation when it's actually enabled at device level. Cc: Martin Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Christoph Hellwig h...@lst.de Signed-off-by: Nicholas

[PATCH-v2 03/15] target: Update SPC/SBC emulation for sess_prot_type

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates standard INQUIRY, INQUIRY EVPD=0x86, READ_CAPACITY_16 and control mode pages to use se_sess-sess_prot_type when determing which type of T10-PI related feature bits can be exposed. This is required for fabric sessions supporting

[PATCH-v2 13/15] tcm_qla2xxx: Set TARGET_PROT_ALL for sup_prot_ops

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds the missing TARGET_PROT_ALL when initializing a new session and declaring the capable se_sess-sup_prot_ops for T10-PI. This is required in order to function with existing qla_target.c DIF protection offload support. Cc: Quinn Tran

[PATCH-v2 09/15] target/iblock: Add checks for backend DIF emulation

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Make sure that IBLOCK only attempts to use backend DIF emulation when it's actually enabled at device level. Cc: Martin Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Christoph Hellwig h...@lst.de Signed-off-by: Nicholas

[PATCH-v2 12/15] vhost/scsi: Add fabric_prot_type attribute support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates vhost-scsi to add a new fabric_prot_type TPG attribute, used for controlling LLD level protection into LIO when the backend device does not support T10-PI. This is required for vhost-scsi to enable WRITE_STRIP + READ_INSERT

[PATCH-v2 05/15] target: Add internal WRITE_STRIP support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds WRITE_STRIP support in target_check_write_prot() that invokes sbc_dif_verify_write() for checking T10-PI metadata before submitting the I/O to a backend driver. Upon verify failure, the specific sense code is propigated up the failure

[PATCH-v2 14/15] tcm_qla2xxx: Add fabric_prot_type attribute support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates qla2xxx target to add a new fabric_prot_type TPG attribute, used for controlling LLD level protection into LIO when the backend device does not support T10-PI. This is required for qla_target.c to enable WRITE_STRIP + READ_INSERT

[PATCH-v2 07/15] target: Add internal READ_INSERT support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds READ_INSERT support in target_check_read_prot() 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

[PATCH-v2 06/15] target: Move cmd-prot_op check into target_check_read_prot

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch moves the existing target_complete_ok_work() check for cmd-prot_op into it's own function, so it's easier to add future support for READ INSERT. Cc: Martin Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc:

[PATCH-v2 11/15] loopback: Add fabric_prot_type attribute support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates loopback to add a new fabric_prot_type TPG attribute, used for controlling LLD level protection into LIO when the backend device does not support T10-PI. Also, go ahead and set DIN_PASS + DOUT_PASS so target-core knows that it will

[PATCH-v2 10/15] target/rd: Add checks for backend DIF emulation

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Make sure that RAMDISK only attempts to use backend DIF emulation when it's actually enabled at device level. Cc: Martin Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org

[PATCH-v2 04/15] target: Move cmd-prot_op check into target_check_write_prot

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch moves the existing target_execute_cmd() check for cmd-prot_op into it's own function, so it's easier to add future support for WRITE STRIP. Cc: Martin Petersen martin.peter...@oracle.com Cc: Sagi Grimberg sa...@mellanox.com Cc: Christoph

[PATCH-v2 15/15] iscsi/iser-target: Add fabric_prot_type attribute support

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates iscsi/iser-target to add a new fabric_prot_type TPG attribute for iser-target, used for controlling LLD level protection into LIO when the backend device does not support T10-PI. This is required for ib_isert to enable WRITE_STRIP

Re: [RFC 02/22] target: Convert enable/disable -device_list to RCU updater

2015-03-29 Thread Sagi Grimberg
On 3/27/2015 11:04 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch converts core_[enable,disable]_device_list_for_node() to RCU updater path code when modifying se_dev_entry pointers. It includes protected rcu_assign_pointer() and invokes

Re: [RFC 01/22] target: Convert transport_lookup_*_lun to RCU reader

2015-03-29 Thread Sagi Grimberg
On 3/27/2015 11:04 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch converts transport_lookup_*_lun() fast-path code to use RCU read path primitives when looking up se_dev_entry. It adds a new array of pointers in se_node_acl-lun_entry_hlist for this

Re: [PATCH 61/86] scsi/qla1280: use uapi/linux/pci_ids.h directly

2015-03-29 Thread Michael S. Tsirkin
On Sun, Mar 29, 2015 at 05:03:36PM +0300, James Bottomley wrote: On Sun, 2015-03-29 at 15:42 +0200, Michael S. Tsirkin wrote: Header moved from linux/pci_ids.h to uapi/linux/pci_ids.h, use the new header directly so we can drop the wrapper in include/linux/pci_ids.h. Signed-off-by:

Re: [PATCH 61/86] scsi/qla1280: use uapi/linux/pci_ids.h directly

2015-03-29 Thread James Bottomley
On Sun, 2015-03-29 at 16:36 +0200, Michael S. Tsirkin wrote: On Sun, Mar 29, 2015 at 05:03:36PM +0300, James Bottomley wrote: On Sun, 2015-03-29 at 15:42 +0200, Michael S. Tsirkin wrote: Header moved from linux/pci_ids.h to uapi/linux/pci_ids.h, use the new header directly so we can drop

[PATCH 61/86] scsi/qla1280: use uapi/linux/pci_ids.h directly

2015-03-29 Thread Michael S. Tsirkin
Header moved from linux/pci_ids.h to uapi/linux/pci_ids.h, use the new header directly so we can drop the wrapper in include/linux/pci_ids.h. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi/qla1280.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 60/86] scsi/arcmsr: use uapi/linux/pci_ids.h directly

2015-03-29 Thread Michael S. Tsirkin
Header moved from linux/pci_ids.h to uapi/linux/pci_ids.h, use the new header directly so we can drop the wrapper in include/linux/pci_ids.h. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi/arcmsr/arcmsr_hba.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 61/86] scsi/qla1280: use uapi/linux/pci_ids.h directly

2015-03-29 Thread James Bottomley
On Sun, 2015-03-29 at 15:42 +0200, Michael S. Tsirkin wrote: Header moved from linux/pci_ids.h to uapi/linux/pci_ids.h, use the new header directly so we can drop the wrapper in include/linux/pci_ids.h. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/scsi/qla1280.c | 2 +-