Re: [PATCH-v2 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-22 Thread Nicholas A. Bellinger
On Thu, 2014-05-22 at 10:37 +0200, Paolo Bonzini wrote: > Il 22/05/2014 04:26, Nicholas A. Bellinger ha scritto: > > From: Nicholas Bellinger > > > > This patch updates virtscsi_probe() to setup necessary Scsi_Host > > level protection resources. (currently hardcod

Re: [PATCH-v2 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-05-22 Thread Nicholas A. Bellinger
On Thu, 2014-05-22 at 09:57 +0300, Michael S. Tsirkin wrote: > On Thu, May 22, 2014 at 02:26:17AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds a virtio_scsi_cmd_req_pi header as recommened by > > Paolo that contains do_pi

[PATCH-v2 5/6] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num. Also update tcm_vhost_submission_work() to pass the pre-allocated cmd->tvc_pro

[PATCH-v2 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates virtscsi_probe() to setup necessary Scsi_Host level protection resources. (currently hardcoded to 1) It changes virtscsi_add_cmd() to attach outgoing / incoming protection SGLs preceeding the data payload, and is using the new virtio_scsi_cmd_req_pi->d

[PATCH-v2 2/6] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Move the overflow check for sgl_count > TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also, rename TCM_VHOST_PREALLOC_PAGES -> TCM_VHOST_PREALLOC_UPAGES to better describe poi

[PATCH-v2 3/6] vhost/scsi: Add preallocation of protection SGLs

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd->tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hell

[PATCH-v2 4/6] vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_iov_to_sgl(), this does sanity checks against the total pr

[PATCH-v2 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST, MKP, Paolo & Co, Here is the v2 patch series for adding T1O protection information (PI) SGL passthrough support between virtio-scsi LLD + vhost-scsi fabric endpoints. Following MST's recommendation, it includes the changes for using bytes intead of number of iov

[PATCH-v2 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a virtio_scsi_cmd_req_pi header as recommened by Paolo that contains do_pi_niov + di_pi_niov elements used for signaling when protection information buffers are expected to preceed the data buffers. Also add new VIRTIO_SCSI_F_T10_PI feature bit to be used

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-20 Thread Nicholas A. Bellinger
On Tue, 2014-05-20 at 10:35 +0200, Paolo Bonzini wrote: > Il 19/05/2014 21:07, Nicholas A. Bellinger ha scritto: > > Hi MST, > > > > So I've finally got some cycles to get back to this code, and wanted to > > verify the outstanding items you had previously raised:

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-19 Thread Nicholas A. Bellinger
On Mon, 2014-05-19 at 22:15 +0300, Michael S. Tsirkin wrote: > On Mon, May 19, 2014 at 12:07:03PM -0700, Nicholas A. Bellinger wrote: > > On Wed, 2014-05-07 at 12:13 +0300, Michael S. Tsirkin wrote: > > > On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: &g

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-05-19 Thread Nicholas A. Bellinger
On Wed, 2014-05-07 at 12:13 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: > > > On Sun, Apr 06, 2014 at 09:32:09PM +, Nicholas A. Bellinger wrote: >

Re: [PATCH 2/2] scsi_debug: simple short transfer injection

2014-05-19 Thread Nicholas A. Bellinger
On Thu, 2014-05-01 at 16:51 +0200, Christoph Hellwig wrote: > Add an option to only transfer half the data for every n-th command. > > Signed-off-by: Christoph Hellwig > Acked-by: Douglas Gilbert Reviewed-by: Nicholas Bellinger > --- > drivers/scsi/scsi_debug.c |8 > 1 file chan

Re: [PATCH 1/2] virtio_scsi: use cmd_size

2014-05-19 Thread Nicholas A. Bellinger
On Thu, 2014-05-01 at 16:51 +0200, Christoph Hellwig wrote: > Taken almost entirely from Nicholas Bellinger's scsi-mq conversion. > > Signed-off-by: Christoph Hellwig > Acked-by: Paolo Bonzini > --- Reviewed-by: Nicholas Bellinger > drivers/scsi/virtio_scsi.c | 25 +++--

Re: [GIT PULL] target fixes for v3.15-rc6

2014-05-17 Thread Nicholas A. Bellinger
On Fri, 2014-05-16 at 14:32 -0700, Nicholas A. Bellinger wrote: > Hello Linus, > > Here are the target-pending fixes for v3.15-rc6. Please go ahead and > pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master > > This series incl

Re: [PATCH] target: fix memory leak on XCOPY

2014-05-17 Thread Nicholas A. Bellinger
On Sat, 2014-05-17 at 06:49 -0400, Mikulas Patocka wrote: > On each processed XCOPY command, two "kmalloc-512" memory objects are > leaked. These represent two allocations of struct xcopy_pt_cmd in > target_core_xcopy.c. > > The reason for the memory leak is that the cmd_kref field is not > initia

Re: SCSI "staging" tree for linux-next?

2014-05-16 Thread Nicholas A. Bellinger
On Fri, 2014-05-16 at 15:38 +0200, Hannes Reinecke wrote: > On 05/15/2014 07:26 AM, Christoph Hellwig wrote: > > Hi James, > > > > we're past -rc5 and no SCSI patches have been collected for 3.16 yet, > > despite a lot of patches including a lot of reviewed ones pending on the > > list. > > > > I'd

[GIT PULL] target fixes for v3.15-rc6

2014-05-16 Thread Nicholas A. Bellinger
Hello Linus, Here are the target-pending fixes for v3.15-rc6. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This series include: - Close race between iser-target network portal shutdown + accepting new connection logins (sag

Re: [PATCH 1/2] target: Don't allow setting WC emulation if device doesn't support

2014-05-14 Thread Nicholas A. Bellinger
On Wed, 2014-05-14 at 17:22 -0700, Andy Grover wrote: > On 05/14/2014 05:07 PM, Nicholas A. Bellinger wrote: > > On Wed, 2014-05-14 at 15:48 -0700, Andy Grover wrote: > >> Just like for pSCSI, if the transport sets get_write_cache, then it is > >> not valid to enable w

Re: [PATCH] block: Export REQ_FLUSH status via sysfs

2014-05-14 Thread Nicholas A. Bellinger
On Wed, 2014-05-14 at 15:51 -0700, Andy Grover wrote: > Whether this is set or not is important for whether good performance is > possible, when using the block device as a backstore for the kernel > target. Exposing this will let kernel target configuration tools provide > this information to the

Re: [PATCH 1/2] target: Don't allow setting WC emulation if device doesn't support

2014-05-14 Thread Nicholas A. Bellinger
On Wed, 2014-05-14 at 15:48 -0700, Andy Grover wrote: > Just like for pSCSI, if the transport sets get_write_cache, then it is > not valid to enable write cache emulation for it. Return an error. > > see https://bugzilla.redhat.com/show_bug.cgi?id=1082675 > > Reviewed-by: Chris Leech > Signed-of

Re: [PATCHv2 RESEND 0/9] target: Save memory on unused se_dev_entrys and se_luns

2014-05-01 Thread Nicholas A. Bellinger
On Thu, 2014-05-01 at 10:53 -0700, Andy Grover wrote: > On 04/24/2014 10:34 PM, Christoph Hellwig wrote: > > On Wed, Apr 23, 2014 at 03:36:27PM -0700, Andy Grover wrote: > >> Does this set look ok, or any other changes needed? Just haven't heard > >> anything. > > > > the series looks reasonable to

Re: [PATCH] target: Allow non-supporting backends to set pi_prot_type to 0

2014-04-17 Thread Nicholas A. Bellinger
On Tue, 2014-04-15 at 14:13 -0700, Andy Grover wrote: > Userspace tools assume if a value is read from configfs, it is valid > and will not cause an error if the same value is written back. The only > valid value for pi_prot_type for backends not supporting DIF is 0, so allow > this particular valu

[GIT PULL] target updates for v3.15-rc1

2014-04-12 Thread Nicholas A. Bellinger
Hello Linus! Here are the target pending updates for v3.15-rc1. Apologies in advance for waiting until the second to last day of the merge window to send these out. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next The highlights thi

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 12:02 +0300, Michael S. Tsirkin wrote: > On Mon, Apr 07, 2014 at 01:56:59AM -0700, Nicholas A. Bellinger wrote: > > On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: > > > On Sun, Apr 06, 2014 at 09:32:09PM +, Nicholas A. Bellinger wrote: >

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 11:45 +0300, Michael S. Tsirkin wrote: > On Sun, Apr 06, 2014 at 09:32:09PM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch updates virtscsi_probe() to setup necessary Scsi_Host > > level protection resources

Re: [PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 11:03 +0300, Sagi Grimberg wrote: > On 4/7/2014 12:32 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch updates virtscsi_probe() to setup necessary Scsi_Host > > level protection resources. (currently hardcod

Re: [PATCH 9/9] target: Enable READ_STRIP emulation in target_complete_ok_work

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 10:49 +0300, Sagi Grimberg wrote: > On 4/3/2014 12:35 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch enables the use of READ_STRIP software emulation in > > target_complete_ok_work() code for I/O READs. > > &

Re: [PATCH 7/9] target: Enable WRITE_INSERT emulation in target_execute_cmd

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 10:39 +0300, Sagi Grimberg wrote: > On 4/3/2014 12:35 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch enables WRITE_INSERT emulation in target_execute_cmd() > > in order to locally generate DIF PI before subm

Re: [PATCH 6/9] target/sbc: Add sbc_dif_write_insert software emulation

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 10:36 +0300, Sagi Grimberg wrote: > On 4/3/2014 12:35 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch adds WRITE_INSERT emulation within target-core > > using TYPE1 / TYPE3 PI modes. > > > > This is usef

Re: [PATCH 2/9] target: Pass in transport supported PI at session initialization

2014-04-07 Thread Nicholas A. Bellinger
On Mon, 2014-04-07 at 10:28 +0300, Sagi Grimberg wrote: > On 4/3/2014 12:35 PM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > In order to support local WRITE_INSERT + READ_STRIP operations for > > non PI enabled fabrics, the fabric driver needs

Re: [PATCH 0/5] target/tcm_fc: Misc. fixups

2014-04-06 Thread Nicholas A. Bellinger
On Fri, 2014-04-04 at 16:54 -0700, Andy Grover wrote: > Hi nab and fcoe developers, > > In fixing the other issue I just posted a patch for, I found some other > things in the tcm_fc fabric that could be improved. Please take a look? > > Thanks! -- Regards -- Andy > > Andy Grover (5): > target

Re: [PATCH] target/tcm_fc: Fix use-after-free of ft_tpg

2014-04-06 Thread Nicholas A. Bellinger
Hi Andy, On Fri, 2014-04-04 at 16:44 -0700, Andy Grover wrote: > ft_del_tpg checks tpg->tport is set before unlinking the tpg from the > tport when the tpg is being removed. Set this pointer in ft_tport_create, > or the unlinking won't happen in ft_del_tpg and tport->tpg will reference > a deleted

[PATCH 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates virtscsi_probe() to setup necessary Scsi_Host level protection resources. (currently hardcoded to 1) It changes virtscsi_add_cmd() to attach outgoing / incoming protection SGLs preceeding the data payload, and is using the new virtio_scsi_cmd_req_pi->d

[PATCH 4/6] vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_iov_to_sgl(), this does sanity checks against the total pr

[PATCH 1/6] virtio-scsi.h: Add virtio_scsi_cmd_req_pi + VIRTIO_SCSI_F_T10_PI bits

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a virtio_scsi_cmd_req_pi header as recommened by Paolo that contains do_pi_niov + di_pi_niov elements used for signaling when protection information buffers are expected to preceed the data buffers. Also add new VIRTIO_SCSI_F_T10_PI feature bit to be used

[PATCH 5/6] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num. Also update tcm_vhost_submission_work() to pass the pre-allocated cmd->tvc_pro

[PATCH 3/6] vhost/scsi: Add preallocation of protection SGLs

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd->tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hell

[PATCH 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST, MKP, Paolo & Co, This is an updated patch series for adding T1O protection information (PI) SGL passthrough support between virtio-scsi LLD + vhost-scsi fabric endpoints. Following Paolo's recommendations, this patch uses VIRTIO_SCSI_F_T10_PI feature bits in bot

[PATCH 2/6] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-04-06 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Move the overflow check for sgl_count > TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also, rename TCM_VHOST_PREALLOC_PAGES -> TCM_VHOST_PREALLOC_UPAGES to better describe poi

Re: [Scst-devel] OSS target - VMware SCSI reservation bug conformity.

2014-04-03 Thread Nicholas A. Bellinger
On Wed, 2014-04-02 at 15:29 -0500, Dr. Greg Wettstein wrote: > On Mar 28, 8:53pm, Vladislav Bolkhovitin wrote: > } Subject: Re: [Scst-devel] OSS target - VMware SCSI reservation bug conform > > > Dr. Greg Wettstein, on 03/27/2014 11:21 AM wrote: > > > Hi, hope the week is going well for everyone.

[PATCH 6/9] target/sbc: Add sbc_dif_write_insert software emulation

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds WRITE_INSERT emulation within target-core using TYPE1 / TYPE3 PI modes. This is useful in order for existing legacy fabrics that do not support protection offloads to interact with backend devices that currently have T10 PI enabled. Cc: Martin K. Peterse

[PATCH 7/9] target: Enable WRITE_INSERT emulation in target_execute_cmd

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch enables WRITE_INSERT emulation in target_execute_cmd() in order to locally generate DIF PI before submitting the WRITE to the underlying backend device. This is required for fabric drivers that currently don't support DIF over-the-wire, in order to inact with

[PATCH 8/9] target/sbc: Add sbc_dif_read_strip software emulation

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Split up __sbc_dif_verify_read() so that VERIFY READ emulation can perform target-core specific READ_STRIP, seperate from the existing FILEIO/RAMDISK backend emulation code. Also add sbc_dif_read_strip() in order to determine number of sectors using cmd->prot_length, and

[PATCH 9/9] target: Enable READ_STRIP emulation in target_complete_ok_work

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch enables the use of READ_STRIP software emulation in target_complete_ok_work() code for I/O READs. This is useful when the fabric does not support READ_STRIP hardware offload, but would still like to interact with backend device that have T10 PI enabled. Cc: M

[PATCH 5/9] target/sbc: Only expose PI read_cap16 bits when supported by fabric

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Only expose the PI protection type bits in READ_CAPACITY_16 if the session + fabric support DIX PASS operations. Cc: Martin K. Petersen Cc: Sagi Grimberg Cc: Or Gerlitz Cc: Quinn Tran Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger --- drivers/target/targe

[PATCH 4/9] target/spc: Only expose PI mode page bits when supported by fabric

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Only expose the control modepage bit for Application Tag Owner (ATO) if the session + fabric support DIX PASS operations. Cc: Martin K. Petersen Cc: Sagi Grimberg Cc: Or Gerlitz Cc: Quinn Tran Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger --- drivers/tar

[PATCH 2/9] target: Pass in transport supported PI at session initialization

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger In order to support local WRITE_INSERT + READ_STRIP operations for non PI enabled fabrics, the fabric driver needs to be able signal what protection offload operations are supported. This is done at session initialization time so the modes can be signaled by individual s

[PATCH 3/9] target/spc: Only expose PI inquiry bits when supported by fabric

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Only expose standard INQUIRY PROTECT=1 and EVPD=0x86 TYPE1/TYPE3 PI control bits if the session + fabric support DIX PASS operations. Cc: Martin K. Petersen Cc: Sagi Grimberg Cc: Or Gerlitz Cc: Quinn Tran Cc: Giridhar Malavali Signed-off-by: Nicholas Bellinger ---

[PATCH 1/9] target/iblock: Fix double bioset_integrity_free bug

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a double free bug during IBLOCK backend shutdown where bioset_integrity_free() was incorrectly called ahead of bioset_free(), who is already making the same call directly. This bug was introduced with commit ecebbf6cc, and will end up triggering a genera

[PATCH 0/9] target: Allow fabric to expose PI + add WRITE_INSERT/READ_STRIP

2014-04-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MKP, Sagi, Quinn & Co, This series allows fabric drivers to expose what TARGET_PROT hardware operations they support at session initialization time, along with adding proper WRITE_INSERT/READ_STRIP emulation support (as originally mentioned by Sagi) into target-core.

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-02 Thread Nicholas A. Bellinger
On Wed, 2014-04-02 at 14:43 +0300, sagi grimberg wrote: > On 4/1/2014 8:45 PM, Nicholas A. Bellinger wrote: > > On Tue, 2014-04-01 at 20:27 +0300, sagi grimberg wrote: > >> On 4/1/2014 8:09 PM, Martin K. Petersen wrote: > >>>>>>>> "Sagi" == Sa

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-02 Thread Nicholas A. Bellinger
On Wed, 2014-04-02 at 09:51 +0300, Sagi Grimberg wrote: > On 4/1/2014 8:45 PM, Nicholas A. Bellinger wrote: > > On Tue, 2014-04-01 at 20:27 +0300, sagi grimberg wrote: > >> On 4/1/2014 8:09 PM, Martin K. Petersen wrote: > >>>>>>>> "Sagi" == Sa

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-04-01 Thread Nicholas A. Bellinger
On Tue, 2014-04-01 at 20:27 +0300, sagi grimberg wrote: > On 4/1/2014 8:09 PM, Martin K. Petersen wrote: > >> "Sagi" == Sagi Grimberg writes: > > Sagi> I originally wrote the code to support that. But it got left > > Sagi> behind since I figured it is not an interesting use-case. If your > >

Re: [PATCH 2/4] tcm_qla2xxx: T10-Dif set harware capability

2014-04-01 Thread Nicholas A. Bellinger
On Tue, 2014-04-01 at 11:04 +0300, Sagi Grimberg wrote: > On 4/1/2014 4:11 AM, Nicholas A. Bellinger wrote: > > >>>> + > >>>> +if (scsi_host_get_prot(lport->qla_vha->host)) { > >>>> +

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-03-31 Thread Nicholas A. Bellinger
On Mon, 2014-03-31 at 17:53 +, Quinn Tran wrote: > On 3/28/14 6:24 PM, "sagi grimberg" wrote: > > >On 3/29/2014 3:53 AM, Quinn Tran wrote: > +} > +} > + > if (lun->lun_se_dev != NULL) { > pr_err("Port Symlink already exists\n");

Re: [PATCH 2/4] tcm_qla2xxx: T10-Dif set harware capability

2014-03-31 Thread Nicholas A. Bellinger
On Mon, 2014-03-31 at 15:38 +, Quinn Tran wrote: > On 3/28/14 5:12 PM, "sagi grimberg" wrote: > > >On 3/29/2014 2:05 AM, Quinn Tran wrote: > >> Set Protection Type(1,2,3) capabilities, Guarg type (CRC/IPchksm) > >> capabilities bits to let TCM core knows of HW/fabric capabilities. > >> > >>

Re: [PATCH 1/4] target/core: T10-Dif: check HW support capabilities

2014-03-31 Thread Nicholas A. Bellinger
On Sat, 2014-03-29 at 04:24 +0300, sagi grimberg wrote: > On 3/29/2014 3:53 AM, Quinn Tran wrote: > > + > > +if (dev->dev_attrib.pi_prot_type) { > > +uint32_t cap[] = { 0, > > + TARGET_DIF_TYPE1_PROTECTION, > > + TARGET_DIF

Re: [PATCH 4/4] target/rd: T10-Dif: RAM disk is allocating more space than required.

2014-03-31 Thread Nicholas A. Bellinger
Hi Quinn & Co, On Mon, 2014-03-31 at 16:15 +, Quinn Tran wrote: > On 3/28/14 5:22 PM, "sagi grimberg" wrote: > > >On 3/29/2014 2:05 AM, Quinn Tran wrote: > >> Ram disk is allocating 8x more space than required for diff data. > >> For large RAM disk test, there is small potential for memory >

Re: [PATCH 3/4] scsi: reintroduce scsi_driver.init_command

2014-03-30 Thread Nicholas A. Bellinger
On Mon, 2014-03-31 at 08:08 +0200, Christoph Hellwig wrote: > On Sun, Mar 30, 2014 at 10:45:04PM -0700, Nicholas A. Bellinger wrote: > > > int scsi_setup_blk_pc_cmnd(struct scsi_device *sdev, struct request *req) > > > { > > > - struct scsi_cmnd *cmd; > > >

Re: [PATCH 0/7] Performance improvements for LSI SCSI cards

2014-03-30 Thread Nicholas A. Bellinger
Hi Matthew, On Thu, 2014-03-27 at 16:40 -0400, Matthew Wilcox wrote: > The host lock is a serious scalability problem on 2-socket and larger > systems which are doing a lot of I/O. Before removing the temporary > usgae of DEF_SCSI_QCMD, we need to remove all uses of serial_number. > > An unrelat

Re: [PATCH 3/4] scsi: reintroduce scsi_driver.init_command

2014-03-30 Thread Nicholas A. Bellinger
On Thu, 2014-03-27 at 17:14 +0100, Christoph Hellwig wrote: > Move control of the prep_fn back from the ULDs into the scsi layer. Besides > cleaning up the code and removing the only use of the unprep_fn > requeuest_queue method this also prepares for usinng blk-mq, which doesn't > have equivalent

Re: [PATCH 4/4] scsi: handle command allocation failure in scsi_reset_provider

2014-03-30 Thread Nicholas A. Bellinger
On Thu, 2014-03-27 at 17:14 +0100, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/scsi/scsi_error.c |6 ++ > 1 file changed, 6 insertions(+) > Reviewed-by: Nicholas Bellinger -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the b

Re: [PATCH 2/4] scsi: remove scsi_end_request

2014-03-30 Thread Nicholas A. Bellinger
Hi hch & jejb, On Thu, 2014-03-27 at 17:14 +0100, Christoph Hellwig wrote: > Simply the I/O completion logic by folding scsi_end_request into its only > caller. There is a single site to either requeue the command or move on > to the next one instead of of the previous convoluted logic. > > Sign

Re: [PATCH v2] Target/iser: Fail SCSI WRITE command if device detected integrity error

2014-03-18 Thread Nicholas A. Bellinger
On Tue, 2014-03-18 at 14:58 +0200, Sagi Grimberg wrote: > If during data-transfer a data-integrity error was detected we > must fail the command with CHECK_CONDITION and not execute > the command. > > Signed-off-by: Sagi Grimberg > Reported-by: Or Gerlitz > --- > Changes from v1: > - Fixed typo

Re: [RFCv2 5/7] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-03-17 Thread Nicholas A. Bellinger
On Mon, 2014-03-17 at 12:02 +0100, Paolo Bonzini wrote: > Il 17/03/2014 06:32, Nicholas A. Bellinger ha scritto: > > + if (vq->iov[0].iov_len == sizeof(v_req_pi)) { > > + req = (unsigned char *)&v_req_pi; > > +

Re: [PATCH 0/4] DIF fixes for kernel 3.15

2014-03-17 Thread Nicholas A. Bellinger
On Mon, 2014-03-17 at 12:52 +0200, Sagi Grimberg wrote: > Hey Nic, > > So here are a couple of fixes for iSER target DIF on top of latest > for-next for 3.15. > > Patch #1 fixes suppressed completions for REG_SIG_MR work requests. > > Patch #2 fixes accounting of post_send_buf_count when RDMA_RE

[RFCv2 1/7] virtio-scsi.h: Add virtio_scsi_cmd_req_pi header definition

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a virtio_scsi_cmd_req_pi header as recommened by Paolo that contains do_pi_niov + di_pi_niov elements used for signaling when protection information buffers are expected to preceed the data buffers. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Martin K.

[RFCv2 0/7] vhost/scsi: Add T10 PI SGL passthrough support

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi MST, MKP, Paolo & Co, This is an updated -v2 series for adding T1O protection information (PI) SGL passthrough support between virtio-scsi LLD + vhost-scsi fabric endpoints. The patch series is available at: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target

[RFCv2 5/7] vhost/scsi: Enable T10 PI IOV -> SGL memory mapping

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates vhost_scsi_handle_vq() to check for the existance of virtio_scsi_cmd_req_pi comparing vq->iov[0].iov_len in order to calculate seperate data + protection SGLs from data_num. Also update tcm_vhost_submission_work() to pass the pre-allocated cmd->tvc_pro

[RFCv2 3/7] vhost/scsi: Add preallocation of protection SGLs

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd->tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hell

[RFCv2 4/7] vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_iov_to_sgl(), this does sanity checks against the total pr

[RFCv2 6/7] vhost/scsi: Add new VIRTIO_SCSI_F_T10_PI feature bit

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a VIRTIO_SCSI_F_T10_PI feature bit for signaling host support of accepting T10 protection information SGLs from virtio-scsi guest. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hellwig Cc: Hannes Reinecke Cc: Sagi Grim

[RFCv2 7/7] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates virtscsi_probe() to setup necessary Scsi_Host level protection resources. (currently hardcoded to 1) It changes virtscsi_add_cmd() to attach outgoing / incoming protection SGLs preceeding the data payload, and is using the new virtio_scsi_cmd_req_pi->d

[RFCv2 2/7] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-03-16 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Move the overflow check for sgl_count > TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also, rename TCM_VHOST_PREALLOC_PAGES -> TCM_VHOST_PREALLOC_UPAGES to better describe poi

Re: [PATCH 5/6] target: Allocate se_luns only when used

2014-03-12 Thread Nicholas A. Bellinger
On Fri, 2014-03-07 at 10:22 -0800, Christoph Hellwig wrote: > On Fri, Mar 07, 2014 at 10:12:09AM -0800, Andy Grover wrote: > > >I can't see how the synchronization can work without refcounting the lun > > >structure. The lock just protectes the assignment, but you free it > > >right after. What h

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-10 Thread Nicholas A. Bellinger
On Thu, 2014-03-06 at 16:05 +0200, sagi grimberg wrote: > On 3/6/2014 12:04 AM, Nicholas A. Bellinger wrote: > > On Wed, 2014-03-05 at 14:12 +0200, Sagi Grimberg wrote: > >> On 3/5/2014 2:06 AM, Nicholas A. Bellinger wrote: > >>> On Tue, 2014-03-04 at 17:17 +0200, Sa

[GIT PULL] target fixes for v3.14-rc6

2014-03-08 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes for v3.14-rc6. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This series addresses a number of outstanding issues wrt to active I/O shutdown using iser-target. This includes: - Fix a long standing tp

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-05 Thread Nicholas A. Bellinger
On Wed, 2014-03-05 at 14:12 +0200, Sagi Grimberg wrote: > On 3/5/2014 2:06 AM, Nicholas A. Bellinger wrote: > > On Tue, 2014-03-04 at 17:17 +0200, Sagi Grimberg wrote: > >> On 3/4/2014 2:00 AM, Nicholas A. Bellinger wrote: > >>> From: Nicholas Bellinger >

Re: [PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-04 Thread Nicholas A. Bellinger
On Tue, 2014-03-04 at 17:17 +0200, Sagi Grimberg wrote: > On 3/4/2014 2:00 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi Or & Sagi, > > > > This series addresses a number of active I/O shutdown related issues > > in iser-ta

Re: [PATCH 5/6] iser-target: Ignore completions for FRWRs in isert_cq_tx_work

2014-03-04 Thread Nicholas A. Bellinger
On Tue, 2014-03-04 at 16:51 +0200, Sagi Grimberg wrote: > On 3/4/2014 2:01 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch changes IB_WR_FAST_REG_MR + IB_WR_LOCAL_INV related > > work requests to include a ISER_FRWR_LI_WRID v

[PATCH 5/6] iser-target: Ignore completions for FRWRs in isert_cq_tx_work

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes IB_WR_FAST_REG_MR + IB_WR_LOCAL_INV related work requests to include a ISER_FRWR_LI_WRID value in order to signal isert_cq_tx_work() that these requests should be ignored. This is necessary because even though IB_SEND_SIGNALED is not set for either wor

[PATCH 0/6] iser-target: Fix active I/O shutdown related issues

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Or & Sagi, This series addresses a number of active I/O shutdown related issues in iser-target code that have come up recently during stress testing. Note there is still a seperate iser-target network portal shutdown bug being tracked down, but this series addresses

[PATCH 6/6] iser-target: Fix command leak for tx_desc->comp_llnode_batch

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses a number of active I/O shutdown issues related to isert_cmd descriptors being leaked that are part of a completion interrupt coalescing batch. This includes adding logic in isert_cq_tx_comp_err() to drain any associated tx_desc->comp_llnode_batch, as

[PATCH 3/6] iscsi/iser-target: Fix isert_conn->state hung shutdown issues

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses a couple of different hug shutdown issues related to wait_event() + isert_conn->state. First, it changes isert_conn->conn_wait + isert_conn->conn_wait_comp_err from waitqueues to completions, and sets ISER_CONN_TERMINATING from within isert_disconnec

[PATCH 4/6] iser-target: Fix post_send_buf_count for RDMA READ/WRITE

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes the incorrect setting of ->post_send_buf_count related to RDMA WRITEs + READs where isert_rdma_rw->send_wr_num was not being taken into account. This includes incrementing ->post_send_buf_count within isert_put_datain() + isert_get_dataout(), decrementin

[PATCH 1/6] iscsi-target: Fix iscsit_get_tpg_from_np tpg_state bug

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a bug in iscsit_get_tpg_from_np() where the tpg->tpg_state sanity check was looking for TPG_STATE_FREE, instead of != TPG_STATE_ACTIVE. The latter is expected during a normal TPG shutdown once the tpg_state goes into TPG_STATE_INACTIVE in order to reject

[PATCH 2/6] iscsi/iser-target: Use list_del_init for ->i_conn_node

2014-03-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger There are a handful of uses of list_empty() for cmd->i_conn_node within iser-target code that expect to return false once a cmd has been removed from the per connect list. This patch changes all uses of list_del -> list_del_init in order to ensure that list_empty() retur

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

2014-03-01 Thread Nicholas A. Bellinger
Hi Linus, Here are the target pending fixes for v3.14-rc5 code. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master The bulk of the series are bugfixes for qla2xxx target NPIV support that went in for v3.14-rc1. Also included are a few DIF related fi

Re: [RFC 0/6] vhost/scsi: Add T10 PI SGL passthrough support

2014-02-24 Thread Nicholas A. Bellinger
On Mon, 2014-02-24 at 11:23 +0100, Paolo Bonzini wrote: > Il 24/02/2014 06:32, Nicholas A. Bellinger ha scritto: > > AFAICT up until this point the ->prio field has been unused, but > > I'm certainly open to better ways of signaling (to vhost) that some > > numb

Re: [PATCH] vhost/scsi: Check LUN structure byte 0 is set to 1, per spec

2014-02-24 Thread Nicholas A. Bellinger
Hi Venkatesh, On Mon, 2014-02-24 at 14:13 -0800, Venkatesh Srinivas wrote: > The virtio spec requires byte 0 of the virtio-scsi LUN structure > to be '1'. > > Signed-off-by: Venkatesh Srinivas > --- > drivers/vhost/scsi.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers

Re: [PATCH]: qla2xxx: Fix kernel panic on selective retransmission request.

2014-02-24 Thread Nicholas A. Bellinger
Hi Greg, On Mon, 2014-02-24 at 13:59 -0600, Dr. Greg Wettstein wrote: > From: Dr. Greg Wettstein > > qla2xxx: Fix kernel panic on selective retransmission request. > > A selective retransmission request (SRR) is a fibre-channel > protocol control request which provides support for requesti

Re: [PATCH 05/11] IB/iser: Replace fastreg descriptor valid bool with indicators container

2014-02-24 Thread Nicholas A. Bellinger
On Mon, 2014-02-24 at 10:27 +0200, Sagi Grimberg wrote: > On 2/24/2014 9:30 AM, Nicholas A. Bellinger wrote: > > On Sun, 2014-02-23 at 22:53 -0800, Nicholas A. Bellinger wrote: > >> On Sun, 2014-02-23 at 14:19 +0200, Sagi Grimberg wrote: > >>> In T10-PI suppor

Re: [PATCH 05/11] IB/iser: Replace fastreg descriptor valid bool with indicators container

2014-02-23 Thread Nicholas A. Bellinger
On Sun, 2014-02-23 at 22:53 -0800, Nicholas A. Bellinger wrote: > On Sun, 2014-02-23 at 14:19 +0200, Sagi Grimberg wrote: > > In T10-PI support we will have memory keys for protection > > buffers and signature transactions. We prefer to compact > > indicators rather than k

Re: [PATCH 05/11] IB/iser: Replace fastreg descriptor valid bool with indicators container

2014-02-23 Thread Nicholas A. Bellinger
On Sun, 2014-02-23 at 14:19 +0200, Sagi Grimberg wrote: > In T10-PI support we will have memory keys for protection > buffers and signature transactions. We prefer to compact > indicators rather than keeping multiple bools. > > This commit does not change any functionality. > > Signed-off-by: Sag

Re: [PATCH 08/11] IB/iser: Support T10-PI operations

2014-02-23 Thread Nicholas A. Bellinger
On Sun, 2014-02-23 at 14:19 +0200, Sagi Grimberg wrote: > Add logic to initialize protection information entities. > Upon each iSCSI task, we keep the scsi_cmnd in order to > query the scsi protection operations and reference to > protection buffers. > > Modify iser_fast_reg_mr to receive indicati

[RFC 2/6] vhost/scsi: Add preallocation of protection SGLs

2014-02-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates tcm_vhost_make_nexus() to pre-allocate per descriptor tcm_vhost_cmd->tvc_prot_sgl[] used to expose protection SGLs from within virtio-scsi guest memory to vhost-scsi. Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Martin K. Petersen Cc: Christoph Hell

[RFC 1/6] vhost/scsi: Move sanity check into vhost_scsi_map_iov_to_sgl

2014-02-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Move the overflow check for sgl_count > TCM_VHOST_PREALLOC_SGLS into vhost_scsi_map_iov_to_sgl() so that it's based on the total number of SGLs for all IOVs, instead of single IOVs. Also, rename TCM_VHOST_PREALLOC_PAGES -> TCM_VHOST_PREALLOC_UPAGES to better describe poi

[RFC 3/6] vhost/scsi: Add T10 PI IOV -> SGL memory mapping logic

2014-02-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds vhost_scsi_map_iov_to_prot() to perform the mapping of T10 data integrity memory between virtio iov + struct scatterlist using get_user_pages_fast() following existing code. As with vhost_scsi_map_iov_to_sgl(), this does sanity checks against the total pr

[RFC 6/6] virtio-scsi: Enable DIF/DIX modes in SCSI host LLD

2014-02-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch updates virtscsi_probe() to setup all necessary Scsi_Host level protection resources necessary to enable DIF on virtio-scsi <-> vhost-scsi LUNs. Currently hardcoded to 1. It changes virtscsi_add_cmd() so that outgoing / incoming protection SGLs are attached a

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