Re: [PATCH 14/14] tcm_loop: Enable DIF/DIX modes in SCSI host LLD

2014-01-13 Thread Nicholas A. Bellinger
On Fri, 2014-01-10 at 16:09 -0500, Martin K. Petersen wrote: nab == Nicholas A Bellinger n...@daterainc.com writes: nab This patch updates tcm_loop_driver_probe() to set protection nab information using scsi_host_set_prot() and scsi_host_set_guard(), nab which currently enabled all modes

Re: [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-13 Thread Nicholas A. Bellinger
On Sun, 2014-01-12 at 13:53 +0200, Sagi Grimberg wrote: SNIP I wander how we can skip sbc_dif_verify_ if the transport already offloaded DIF verify. I think that the transport should signal the core layer that it is able to offload DIF (ADD/STRIP/PASS/VERIFY), in which case the

Re: [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-13 Thread Nicholas A. Bellinger
On Sun, 2014-01-12 at 13:59 +0200, Sagi Grimberg wrote: On 1/10/2014 9:04 AM, Nicholas A. Bellinger wrote: On Thu, 2014-01-09 at 16:58 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: SNIP diff --git a/drivers/target/target_core_sbc.c b/drivers/target

Re: [PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-13 Thread Nicholas A. Bellinger
On Mon, 2014-01-13 at 10:52 -0800, James Bottomley wrote: On Mon, 2014-01-13 at 10:30 -0800, Nicholas A. Bellinger wrote: Hey MKP, On Fri, 2014-01-10 at 16:01 -0500, Martin K. Petersen wrote: nab == Nicholas A Bellinger n...@daterainc.com writes: nab This patch adds support

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-10 Thread Nicholas A. Bellinger
On Fri, 2014-01-10 at 11:50 -0800, Andy Grover wrote: > On 01/09/2014 10:21 PM, Nicholas A. Bellinger wrote: > >> What about FORMAT_UNIT emulation? > > > > Would certainly be useful to have.. > > > >> The backstore protection configuration is done at the

Re: randconfig build error with next-20140110, in drivers/target/target_core_sbc.c

2014-01-10 Thread Nicholas A. Bellinger
Hi Jim, On Fri, 2014-01-10 at 06:57 -0700, Jim Davis wrote: > Building with the attached random configuration file, > > LD init/built-in.o > drivers/built-in.o: In function `sbc_dif_v1_verify': > /home/jim/linux/drivers/target/target_core_sbc.c:1019: undefined > reference to `crc_t10dif'

Re: randconfig build error with next-20140110, in drivers/target/target_core_sbc.c

2014-01-10 Thread Nicholas A. Bellinger
Hi Jim, On Fri, 2014-01-10 at 06:57 -0700, Jim Davis wrote: Building with the attached random configuration file, LD init/built-in.o drivers/built-in.o: In function `sbc_dif_v1_verify': /home/jim/linux/drivers/target/target_core_sbc.c:1019: undefined reference to `crc_t10dif' make:

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-10 Thread Nicholas A. Bellinger
On Fri, 2014-01-10 at 11:50 -0800, Andy Grover wrote: On 01/09/2014 10:21 PM, Nicholas A. Bellinger wrote: What about FORMAT_UNIT emulation? Would certainly be useful to have.. The backstore protection configuration is done at the target side via configfs/targetcli, if you publish DIF

Re: [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 16:58 +0200, Sagi Grimberg wrote: > On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds sbc_check_prot() for performing various DIF > > related CDB sanity checks, along with setting SCF_PROT

Re: [PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 13:01 +0200, Sagi Grimberg wrote: > On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds support for exposing DIF protection device > > attributes via configfs. This includes: > > > >

Re: [PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:43 +0200, Sagi Grimberg wrote: > On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ > > exception cases into transport_sen

Re: [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:32 +0200, Sagi Grimberg wrote: > On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds support for DIF protection into rd_execute_rw() code > > for WRITE/READ I/O using sbc_dif_verify_[write,rea

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:24 +0200, Sagi Grimberg wrote: > On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch updates sbc_emulate_readcapacity_16() to set > > P_TYPE and PROT_EN bits when DIF emulation is enabled by > &g

Re: [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 21:00 -0500, Martin K. Petersen wrote: > >>>>> "Nic" == Nicholas A Bellinger writes: > > Nic> This series contains initial support for target mode DIF > Nic> Type1+Type3 emulation within target core, RAMDISK_MCP device > Nic>

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 11:17 +0100, Hannes Reinecke wrote: > On 01/09/2014 12:18 AM, Nicholas A. Bellinger wrote: > > On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: > >> Other than that the sector_div() patch is correct. > >> > > > > Thanks for

[PATCH 3/3] iscsi-target: Pre-allocate more tags to avoid ack starvation

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses an traditional iscsi-target fabric ack starvation issue where iscsit_allocate_cmd() -> percpu_ida_alloc_state() ends up hitting slow path percpu-ida code, because iscsit_ack_from_expstatsn() is expected to free ack'ed tags after tag allocat

[PATCH 0/3] percpu-ida/iscsi-target: Address connection reset starved tag hang

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, This short series addresses a bug in >= v3.12 iscsi-target code where a connection reset occuring once percpu_ida_alloc() goes into starved tag uninterruptible sleep mode causes an indefinate hang, due to the SIGINT being ignored that normally for

[PATCH 1/3] percpu_ida: Add tag alloc interface for interruptible sleep

2014-01-09 Thread Nicholas A. Bellinger
for backwards compatiblity with existing percpu_ida_alloc() consumers. Signed-off-by: Kent Overstreet Signed-off-by: Nicholas Bellinger --- include/linux/percpu_ida.h | 11 ++- lib/percpu_ida.c | 13 + 2 files changed, 19 insertions(+), 5 deletions(-) diff

[PATCH 2/3] iscsi-target: Fix connection reset hang with percpu_ida_alloc

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses a bug where connection reset would hang indefinately when percpu_ida_alloc() was starved for tags, and always assumed uninterruptible sleep mode. So now with percpu_ida_alloc_state() available to make interruptible sleep optional, convert

Re: [PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:32 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic

Re: [PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:43 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ exception cases into transport_send_check_condition_and_sense

Re: [PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 13:01 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for exposing DIF protection device attributes via configfs. This includes: pi_prot_type: Protection

Re: [PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 16:58 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting SCF_PROT once sanity checks

[PATCH 1/3] percpu_ida: Add tag alloc interface for interruptible sleep

2014-01-09 Thread Nicholas A. Bellinger
. This includes a wrapper for backwards compatiblity with existing percpu_ida_alloc() consumers. Signed-off-by: Kent Overstreet k...@daterainc.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- include/linux/percpu_ida.h | 11 ++- lib/percpu_ida.c | 13 + 2

[PATCH 2/3] iscsi-target: Fix connection reset hang with percpu_ida_alloc

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch addresses a bug where connection reset would hang indefinately when percpu_ida_alloc() was starved for tags, and always assumed uninterruptible sleep mode. So now with percpu_ida_alloc_state() available to make interruptible sleep optional

[PATCH 3/3] iscsi-target: Pre-allocate more tags to avoid ack starvation

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch addresses an traditional iscsi-target fabric ack starvation issue where iscsit_allocate_cmd() - percpu_ida_alloc_state() ends up hitting slow path percpu-ida code, because iscsit_ack_from_expstatsn() is expected to free ack'ed tags after

[PATCH 0/3] percpu-ida/iscsi-target: Address connection reset starved tag hang

2014-01-09 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, This short series addresses a bug in = v3.12 iscsi-target code where a connection reset occuring once percpu_ida_alloc() goes into starved tag uninterruptible sleep mode causes an indefinate hang, due to the SIGINT being ignored

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 11:17 +0100, Hannes Reinecke wrote: On 01/09/2014 12:18 AM, Nicholas A. Bellinger wrote: On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: SNIP Other than that the sector_div() patch is correct. nod Thanks for confirming that sector_div() is correct here

Re: [PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 21:00 -0500, Martin K. Petersen wrote: Nic == Nicholas A Bellinger n...@daterainc.com writes: Nic This series contains initial support for target mode DIF Nic Type1+Type3 emulation within target core, RAMDISK_MCP device Nic backend, and tcm_loop fabric driver. Super

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-09 Thread Nicholas A. Bellinger
On Thu, 2014-01-09 at 12:24 +0200, Sagi Grimberg wrote: On 1/8/2014 10:36 PM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-08 Thread Nicholas A. Bellinger
On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: > On 12/24/2013 04:35 AM, Chen Gang wrote: > > On 12/23/2013 02:51 PM, Nicholas A. Bellinger wrote: > >> On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote: > >>> The related fix patch changed "s

[PATCH 04/14] target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF read/write verify emulation for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation. This includes sbc_dif_verify_write() + sbc_dif_verify_read() calls accessable by backend drivers to perform DIF verify for SGL based data

[PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ exception cases into transport_send_check_condition_and_sense(). This includes: LOGICAL BLOCK GUARD CHECK FAILED LOGICAL BLOCK APPLICATION TAG CHECK FAILED LOGICAL BLOCK REFERENCE TAG CHECK FAILED

[PATCH 05/14] target/spc: Add protection bit to standard INQUIRY output

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_emulate_inquiry_std() to set the PROTECT bit when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by: Nicholas Bellinger

[PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting SCF_PROT once sanity checks have passed. Also, add calls in sbc_parse_cdb() for READ_[10,12,16] + WRITE_[10,12,16] to perform DIF sanity checking. Cc: Martin K

[PATCH 08/14] target/spc: Expose ATO bit in control mode page

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_modesense_control() to set the Application Tag Owner (ATO) bit when when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by: Nicholas

[PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc: Or Gerlitz Signed-off-by: Nicholas Bellinger

[PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for exposing DIF protection device attributes via configfs. This includes: pi_prot_type: Protection Type (0, 1, 3 currently support) pi_prot_version: Protection Version (DIF v1 currently supported) pi_guard_type: Guard Type (1=DIF CRC

[PATCH 11/14] target/rd: Refactor rd_build_device_space + rd_release_device_space

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch refactors rd_build_device_space() + rd_release_device_space() into rd_allocate_sgl_table() + rd_release_device_space() so that they may be used seperatly for setup + release of protection information scatterlists. Also add explicit memset of pages within

[PATCH 14/14] tcm_loop: Enable DIF/DIX modes in SCSI host LLD

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_loop_driver_probe() to set protection information using scsi_host_set_prot() and scsi_host_set_guard(), which currently enabled all modes of DIF/DIX protection, minus DIF TYPE0. Also, update tcm_loop_submission_work() to pass struct scsi_cmnd

[PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic. It also adds rd_get_prot_table() for locating protection SGLs assoicated with the ramdisk backend device. Cc: Martin K. Petersen Cc

[PATCH 06/14] target/spc: Add protection related bits to INQUIRY EVPD=0x86

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates spc_emulate_evpd_86() (extended INQUIRY) to report GRD_CHK (Guard Check) and REF_CHK (Reference Check) bits when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grimberg Cc

[PATCH 12/14] target/rd: Add support for protection SGL setup + release

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds rd_build_prot_space() + rd_release_prot_space() logic to setup + release protection information scatterlists. It also adds rd_init_prot() + rd_free_prot() se_subsystem_api callbacks used by target core code for setup + release of protection information

[PATCH 01/14] target: Add DIF related base definitions

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds DIF related definitions to target_core_base.h that includes enums for target_prot_op + target_prot_type + target_prot_version + target_guard_type + target_pi_error. Also included is struct se_dif_v1_tuple, along with changes to struct se_cmd, struct

[PATCH 10/14] target: Add protection SGLs to target_submit_cmd_map_sgls

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support to target_submit_cmd_map_sgls() for accepting 'sgl_prot' + 'sgl_prot_count' parameters for DIF protection information. Note the passed parameters are stored at se_cmd->t_prot_sg and se_cmd->t_prot_nents respectively. Also, update tc

[PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MKP & SCSI folks, This series contains initial support for target mode DIF Type1+Type3 emulation within target core, RAMDISK_MCP device backend, and tcm_loop fabric driver. DIF emulation is enabled via a new 'pi_prot_type' device attribute within configfs, w

[PATCH 10/14] target: Add protection SGLs to target_submit_cmd_map_sgls

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support to target_submit_cmd_map_sgls() for accepting 'sgl_prot' + 'sgl_prot_count' parameters for DIF protection information. Note the passed parameters are stored at se_cmd-t_prot_sg and se_cmd-t_prot_nents respectively. Also

[PATCH 00/14] target: Initial support for DIF Type1+Type3 emulation

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi MKP SCSI folks, This series contains initial support for target mode DIF Type1+Type3 emulation within target core, RAMDISK_MCP device backend, and tcm_loop fabric driver. DIF emulation is enabled via a new 'pi_prot_type' device attribute within

[PATCH 01/14] target: Add DIF related base definitions

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds DIF related definitions to target_core_base.h that includes enums for target_prot_op + target_prot_type + target_prot_version + target_guard_type + target_pi_error. Also included is struct se_dif_v1_tuple, along with changes to struct

[PATCH 14/14] tcm_loop: Enable DIF/DIX modes in SCSI host LLD

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates tcm_loop_driver_probe() to set protection information using scsi_host_set_prot() and scsi_host_set_guard(), which currently enabled all modes of DIF/DIX protection, minus DIF TYPE0. Also, update tcm_loop_submission_work() to pass

[PATCH 13/14] target/rd: Add DIF protection into rd_execute_rw

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF protection into rd_execute_rw() code for WRITE/READ I/O using sbc_dif_verify_[write,read]() logic. It also adds rd_get_prot_table() for locating protection SGLs assoicated with the ramdisk backend device. Cc: Martin K

[PATCH 06/14] target/spc: Add protection related bits to INQUIRY EVPD=0x86

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates spc_emulate_evpd_86() (extended INQUIRY) to report GRD_CHK (Guard Check) and REF_CHK (Reference Check) bits when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph

[PATCH 12/14] target/rd: Add support for protection SGL setup + release

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds rd_build_prot_space() + rd_release_prot_space() logic to setup + release protection information scatterlists. It also adds rd_init_prot() + rd_free_prot() se_subsystem_api callbacks used by target core code for setup + release

[PATCH 09/14] target/configfs: Expose protection device attributes

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for exposing DIF protection device attributes via configfs. This includes: pi_prot_type: Protection Type (0, 1, 3 currently support) pi_prot_version: Protection Version (DIF v1 currently supported) pi_guard_type

[PATCH 11/14] target/rd: Refactor rd_build_device_space + rd_release_device_space

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch refactors rd_build_device_space() + rd_release_device_space() into rd_allocate_sgl_table() + rd_release_device_space() so that they may be used seperatly for setup + release of protection information scatterlists. Also add explicit memset

[PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates sbc_emulate_readcapacity_16() to set P_TYPE and PROT_EN bits when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h...@suse.de

[PATCH 05/14] target/spc: Add protection bit to standard INQUIRY output

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates spc_emulate_inquiry_std() to set the PROTECT bit when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h...@suse.de Cc: Sagi

[PATCH 03/14] target/sbc: Add sbc_check_prot + update sbc_parse_cdb for DIF

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds sbc_check_prot() for performing various DIF related CDB sanity checks, along with setting SCF_PROT once sanity checks have passed. Also, add calls in sbc_parse_cdb() for READ_[10,12,16] + WRITE_[10,12,16] to perform DIF sanity

[PATCH 02/14] target: Add DIF CHECK_CONDITION ASC/ASCQ exception cases

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF related CHECK_CONDITION ASC/ASCQ exception cases into transport_send_check_condition_and_sense(). This includes: LOGICAL BLOCK GUARD CHECK FAILED LOGICAL BLOCK APPLICATION TAG CHECK FAILED LOGICAL BLOCK

[PATCH 08/14] target/spc: Expose ATO bit in control mode page

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch updates spc_modesense_control() to set the Application Tag Owner (ATO) bit when when DIF emulation is enabled by the backend device. Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: Hannes Reinecke h

[PATCH 04/14] target/sbc: Add DIF TYPE1+TYPE3 read/write verify emulation

2014-01-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds support for DIF read/write verify emulation for TARGET_DIF_TYPE1_PROT + TARGET_DIF_TYPE3_PROT operation. This includes sbc_dif_verify_write() + sbc_dif_verify_read() calls accessable by backend drivers to perform DIF verify for SGL

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2014-01-08 Thread Nicholas A. Bellinger
On Wed, 2014-01-08 at 08:32 +0100, Hannes Reinecke wrote: On 12/24/2013 04:35 AM, Chen Gang wrote: On 12/23/2013 02:51 PM, Nicholas A. Bellinger wrote: On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote: SNIP The related fix patch changed start_lba = lba % ... to start_lba = lba

Re: bio_integrity_verify() bug causing READ verify to be silently skipped

2013-12-24 Thread Nicholas A. Bellinger
On Mon, 2013-12-23 at 20:20 -0800, Nicholas A. Bellinger wrote: > Hi Martin & Co, > > So after playing with the mainline DIF client against an initial WIP > target DIF support patch, I've started hitting a bug in > bio_integrity_verify() that causes READ verify logic to be

Re: bio_integrity_verify() bug causing READ verify to be silently skipped

2013-12-24 Thread Nicholas A. Bellinger
On Mon, 2013-12-23 at 20:20 -0800, Nicholas A. Bellinger wrote: Hi Martin Co, So after playing with the mainline DIF client against an initial WIP target DIF support patch, I've started hitting a bug in bio_integrity_verify() that causes READ verify logic to be silently skipped for both

bio_integrity_verify() bug causing READ verify to be silently skipped

2013-12-23 Thread Nicholas A. Bellinger
request() is never called from scsi_mq_end_request() -> blk_mq_end_io() completion path code. Thank you, --nab >From 32242942edca095e8dd126cb1408f2842340773e Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Tue, 24 Dec 2013 04:00:24 + Subject: [PATCH] bio-integrity: Fix bio_int

scsi-mq WIP updated to v3.13-rc3

2013-12-23 Thread Nicholas A. Bellinger
Hi Folks, Just a heads up that scsi-mq alpha code has been updated to v3.13-rc3 using the freshly upstreamed blk-mq logic. The working branch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git scsi-mq The changelog since the last v3.12-rc3 rev includes:

scsi-mq WIP updated to v3.13-rc3

2013-12-23 Thread Nicholas A. Bellinger
Hi Folks, Just a heads up that scsi-mq alpha code has been updated to v3.13-rc3 using the freshly upstreamed blk-mq logic. The working branch is available here: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git scsi-mq The changelog since the last v3.12-rc3 rev includes:

bio_integrity_verify() bug causing READ verify to be silently skipped

2013-12-23 Thread Nicholas A. Bellinger
scsi_mq_end_request() - blk_mq_end_io() completion path code. Thank you, --nab From 32242942edca095e8dd126cb1408f2842340773e Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger n...@linux-iscsi.org Date: Tue, 24 Dec 2013 04:00:24 + Subject: [PATCH] bio-integrity: Fix bio_integrity_verify segment

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2013-12-22 Thread Nicholas A. Bellinger
On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote: > On 12/22/2013 10:56 AM, Nicholas A. Bellinger wrote: > > Hi Chen, > > > > On Sat, 2013-12-21 at 10:08 +0800, Chen Gang wrote: > >> In kernel, need use div64_u64_rem() instead of operator '%' for u64,

Re: [scsi-mq] WARNING: CPU: 0 PID: 99 at block/elevator.c:193 elevator_init()

2013-12-22 Thread Nicholas A. Bellinger
On Mon, 2013-12-23 at 11:16 +0800, Fengguang Wu wrote: > Greetings, > > I got the below dmesg and the first bad commit is > > commit 29ff818720ce09b044652b83e9c70ef474800d54 > Author: Nicholas Bellinger > AuthorDate: Thu May 23 22:11:38 2013 -0700 > Commit

Re: status of block-integrity

2013-12-22 Thread Nicholas A. Bellinger
n working on enabling DIF support in scsi-mq recently, and AFAICT the only part that is required in blk-mq for DIF emulation to function with scsi-debug is the following patch. commit 1428a390cc16025f93905852777d4afd8aeba05d Author: Nicholas Bellinger Date: Sun Dec 22 11:58:49 2013 +

Re: status of block-integrity

2013-12-22 Thread Nicholas A. Bellinger
support in scsi-mq recently, and AFAICT the only part that is required in blk-mq for DIF emulation to function with scsi-debug is the following patch. commit 1428a390cc16025f93905852777d4afd8aeba05d Author: Nicholas Bellinger n...@linux-iscsi.org Date: Sun Dec 22 11:58:49 2013 + blk-mq: Add

Re: [scsi-mq] WARNING: CPU: 0 PID: 99 at block/elevator.c:193 elevator_init()

2013-12-22 Thread Nicholas A. Bellinger
On Mon, 2013-12-23 at 11:16 +0800, Fengguang Wu wrote: Greetings, I got the below dmesg and the first bad commit is commit 29ff818720ce09b044652b83e9c70ef474800d54 Author: Nicholas Bellinger n...@linux-iscsi.org AuthorDate: Thu May 23 22:11:38 2013 -0700 Commit: Nicholas

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2013-12-22 Thread Nicholas A. Bellinger
On Sun, 2013-12-22 at 17:17 +0800, Chen Gang wrote: On 12/22/2013 10:56 AM, Nicholas A. Bellinger wrote: Hi Chen, On Sat, 2013-12-21 at 10:08 +0800, Chen Gang wrote: In kernel, need use div64_u64_rem() instead of operator '%' for u64, or can not pass compiling (with allmodconfig under

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2013-12-21 Thread Nicholas A. Bellinger
Hi Chen, On Sat, 2013-12-21 at 10:08 +0800, Chen Gang wrote: > In kernel, need use div64_u64_rem() instead of operator '%' for u64, or > can not pass compiling (with allmodconfig under metag): > > MODPOST 2909 modules > ERROR: "__umoddi3" [drivers/target/target_core_mod.ko] undefined! > >

[GIT PULL] target fixes for v3.13-rc5

2013-12-21 Thread Nicholas A. Bellinger
based upon the current block_size to address a bug where large sized I/Os (> 1M) where being rejected. Thank you, --nab Andy Grover (1): target: Remove extra percpu_ref_init Eric Seppanen (1): iscsi-target: return -EINVAL on oversized configfs parameter Nicholas Bellinger (5): iscsi-tar

[GIT PULL] target fixes for v3.13-rc5

2013-12-21 Thread Nicholas A. Bellinger
based upon the current block_size to address a bug where large sized I/Os ( 1M) where being rejected. Thank you, --nab Andy Grover (1): target: Remove extra percpu_ref_init Eric Seppanen (1): iscsi-target: return -EINVAL on oversized configfs parameter Nicholas Bellinger (5): iscsi-target

Re: [PATCH] drivers: target: target_core_mod: use div64_u64_rem() instead of operator '%' for u64

2013-12-21 Thread Nicholas A. Bellinger
Hi Chen, On Sat, 2013-12-21 at 10:08 +0800, Chen Gang wrote: In kernel, need use div64_u64_rem() instead of operator '%' for u64, or can not pass compiling (with allmodconfig under metag): MODPOST 2909 modules ERROR: __umoddi3 [drivers/target/target_core_mod.ko] undefined! Also

Re: linux-next: Tree for Dec 19 (target)

2013-12-19 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 11:32 -0800, Randy Dunlap wrote: > On 12/18/13 21:51, Stephen Rothwell wrote: > > Hi all, > > > > Changes since 20131218: > > > > > on i386: > > drivers/built-in.o: In function `target_alua_state_check': > (.text+0x3fc859): undefined reference to `__udivdi3' > > Mmm,

Re: linux-next: Tree for Dec 19 (target)

2013-12-19 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 11:32 -0800, Randy Dunlap wrote: On 12/18/13 21:51, Stephen Rothwell wrote: Hi all, Changes since 20131218: on i386: drivers/built-in.o: In function `target_alua_state_check': (.text+0x3fc859): undefined reference to `__udivdi3' Mmm, this appears to

Re: [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c

2013-12-18 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 00:02 +0530, Rashika Kheria wrote: > Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(), > tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in > loopback/tcm_loop.c because they are not used outside this file. > > This eliminates the following

Re: [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c

2013-12-18 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 00:05 +0530, Rashika Kheria wrote: > Mark functions ft_tpg_alloc_fabric_acl(), ft_register_configfs() and > ft_deregister_configfs() as static in tcm_fc/tfc_conf.c because they are > not used outside this file. > > This eliminates the following warnings in tcm_fc/tfc_conf.c:

Re: [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c

2013-12-18 Thread Nicholas A. Bellinger
On Wed, 2013-12-18 at 23:56 +0530, Rashika Kheria wrote: > Mark function iblock_get_write_cache() as static in target_core_iblock.c > because it is not used outside this file. > > This eliminates the following warning in target_core_iblock.c: > drivers/target/target_core_iblock.c:766:6: warning:

Re: [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h

2013-12-18 Thread Nicholas A. Bellinger
On Wed, 2013-12-18 at 23:54 +0530, Rashika Kheria wrote: > Move prototype declaration of function > spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header > file target_core_pr.h because it is used by more than one file. > > This eliminates the following warning in

Re: randconfig build error with next-20131218, in drivers/target/target_core_alua.c

2013-12-18 Thread Nicholas A. Bellinger
Hi Jim, On Wed, 2013-12-18 at 06:45 -0700, Jim Davis wrote: > Building with the attached random configuration file, > > LD init/built-in.o > drivers/built-in.o: In function `core_alua_state_lba_dependent': > /home/jim/linux/drivers/target/target_core_alua.c:492: undefined > reference to

Re: linux-next: build warning after merge of the target-updates tree

2013-12-18 Thread Nicholas A. Bellinger
Hi Stephen, On Wed, 2013-12-18 at 17:39 +1100, Stephen Rothwell wrote: > Hi Nicholas, > > After merging the target-updates tree, today's linux-next build (x86_64 > allmodconfig) produced this warning: > > drivers/target/target_core_alua.c: In function > 'core_alua_state_lba_dependent': >

Re: linux-next: build warning after merge of the target-updates tree

2013-12-18 Thread Nicholas A. Bellinger
Hi Stephen, On Wed, 2013-12-18 at 17:39 +1100, Stephen Rothwell wrote: Hi Nicholas, After merging the target-updates tree, today's linux-next build (x86_64 allmodconfig) produced this warning: drivers/target/target_core_alua.c: In function 'core_alua_state_lba_dependent':

Re: randconfig build error with next-20131218, in drivers/target/target_core_alua.c

2013-12-18 Thread Nicholas A. Bellinger
Hi Jim, On Wed, 2013-12-18 at 06:45 -0700, Jim Davis wrote: Building with the attached random configuration file, LD init/built-in.o drivers/built-in.o: In function `core_alua_state_lba_dependent': /home/jim/linux/drivers/target/target_core_alua.c:492: undefined reference to

Re: [PATCH 1/4] drivers: target: Move prototype declaration of function to header file target_core_pr.h

2013-12-18 Thread Nicholas A. Bellinger
On Wed, 2013-12-18 at 23:54 +0530, Rashika Kheria wrote: Move prototype declaration of function spc_parse_naa_6h_vendor_specific() from target_core_xcopy.c to header file target_core_pr.h because it is used by more than one file. This eliminates the following warning in target_core_spc.c:

Re: [PATCH 2/4] drivers: target: Mark function as static in target_core_iblock.c

2013-12-18 Thread Nicholas A. Bellinger
On Wed, 2013-12-18 at 23:56 +0530, Rashika Kheria wrote: Mark function iblock_get_write_cache() as static in target_core_iblock.c because it is not used outside this file. This eliminates the following warning in target_core_iblock.c: drivers/target/target_core_iblock.c:766:6: warning: no

Re: [PATCH 4/4] drivers: target: Mark functions and structures as static in tfc_conf.c

2013-12-18 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 00:05 +0530, Rashika Kheria wrote: Mark functions ft_tpg_alloc_fabric_acl(), ft_register_configfs() and ft_deregister_configfs() as static in tcm_fc/tfc_conf.c because they are not used outside this file. This eliminates the following warnings in tcm_fc/tfc_conf.c:

Re: [PATCH 3/4] drivers: target: Mark functions as static in tcm_loop.c

2013-12-18 Thread Nicholas A. Bellinger
On Thu, 2013-12-19 at 00:02 +0530, Rashika Kheria wrote: Mark functions tcm_loop_make_naa_tpg(), tcm_loop_drop_naa_tpg(), tcm_loop_make_scsi_hba() and tcm_loop_drop_scsi_hba() as static in loopback/tcm_loop.c because they are not used outside this file. This eliminates the following warning

Re: Re: scsi-mq + open-iscsi support patches..?

2013-11-27 Thread Nicholas A. Bellinger
Hi Jianpeng, (Trimming CC's) On Wed, 2013-11-27 at 10:46 +0800, kedacomkernel wrote: > Hi all, > I used target-pending/scsi-mq to test intel ahci,but it can't work.I > modify some places, now it can work.But still met hung task or oops. So after looking at your patches sent offlist, I

Re: Re: scsi-mq + open-iscsi support patches..?

2013-11-27 Thread Nicholas A. Bellinger
Hi Jianpeng, (Trimming CC's) On Wed, 2013-11-27 at 10:46 +0800, kedacomkernel wrote: Hi all, I used target-pending/scsi-mq to test intel ahci,but it can't work.I modify some places, now it can work.But still met hung task or oops. So after looking at your patches sent offlist, I don't

Re: linux-next: Tree for Nov 15 (target_core_mod)

2013-11-19 Thread Nicholas A. Bellinger
On Tue, 2013-11-19 at 10:08 -0800, Randy Dunlap wrote: > On 11/18/13 11:46, Nicholas A. Bellinger wrote: > > That does fix the build errors. Thanks. > > Here is a more complete patch with a patch description and S-O-B. > I would have put your S-O-B in it but you didn't i

Re: linux-next: Tree for Nov 15 (target_core_mod)

2013-11-19 Thread Nicholas A. Bellinger
On Tue, 2013-11-19 at 10:08 -0800, Randy Dunlap wrote: On 11/18/13 11:46, Nicholas A. Bellinger wrote: SNIP That does fix the build errors. Thanks. Here is a more complete patch with a patch description and S-O-B. I would have put your S-O-B in it but you didn't include one. Feel free

Re: linux-next: Tree for Nov 15 (target_core_mod)

2013-11-18 Thread Nicholas A. Bellinger
On Fri, 2013-11-15 at 09:41 -0800, Randy Dunlap wrote: > On 11/14/13 21:24, Stephen Rothwell wrote: > > Hi all, > > > > Please do *not* add any v3.14 material to linux-next until after > > v3.13-rc1 is released. > > > > Changes since 20131114: > > > > > on i386: > > > ERROR:

Re: linux-next: Tree for Nov 15 (target_core_mod)

2013-11-18 Thread Nicholas A. Bellinger
On Fri, 2013-11-15 at 09:41 -0800, Randy Dunlap wrote: On 11/14/13 21:24, Stephen Rothwell wrote: Hi all, Please do *not* add any v3.14 material to linux-next until after v3.13-rc1 is released. Changes since 20131114: on i386: ERROR: percpu_ref_cancel_init

Re: [GIT PULL] block IO core bits for 3.13

2013-11-14 Thread Nicholas A. Bellinger
On Fri, 2013-11-08 at 10:48 -0700, Jens Axboe wrote: > Hi Linus, > > This is the pull request for the core changes in the block layer for > 3.13. It contains: > > - The new blk-mq request interface. This is a new and more scalable > queueing model that marries the best part of the request

Re: [GIT PULL] block IO core bits for 3.13

2013-11-14 Thread Nicholas A. Bellinger
On Fri, 2013-11-08 at 10:48 -0700, Jens Axboe wrote: Hi Linus, This is the pull request for the core changes in the block layer for 3.13. It contains: - The new blk-mq request interface. This is a new and more scalable queueing model that marries the best part of the request based

<    5   6   7   8   9   10   11   12   13   14   >