Clarification for Persistent Reservation + All Registrants

2014-12-12 Thread Nicholas A. Bellinger
Hello T10/SCSI folks, A question came up on the LIO target-devel mailing list recently wrt the proper handling of Persistent Reservations + All Registrants logic in a couple of different scenarios. The crux of the confusion stems from how registrations are treated before an explicit PR-OUT RESERV

Re: [PATCH] scsi: fix random memory corruption with scsi-mq + T10 PI

2014-12-11 Thread Nicholas A. Bellinger
Hi Tony, On Mon, 2014-12-08 at 17:20 -0500, Tony Battersby wrote: > This fixes random memory corruption triggered when all three of the > following are true: > > * scsi-mq enabled > * T10 Protection Information (DIF) enabled > * SCSI host with sg_tablesize > SCSI_MAX_SG_SEGMENTS (128) > > The sy

Re: [PATCH 1/4] target: remove unneeded array

2014-12-01 Thread Nicholas A. Bellinger
On Sun, 2014-11-30 at 19:14 +0100, Julia Lawall wrote: > From: Julia Lawall > > Delete a local array that is only used to be initialized by memset. > > A semantic patch that makes this change is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > identifier x; > type T; > @@ > > { > ...

Re: [PATCH] iscsi-target: fix error path in iscsi_target_init_module()

2014-12-01 Thread Nicholas A. Bellinger
On Sun, 2014-11-30 at 12:00 +0100, Lino Sanfilippo wrote: > In iscsi_target_init_module() unwind transport protocol registration in case > that iscsit_load_discovery_tpg() failed. > > Signed-off-by: Lino Sanfilippo > --- > drivers/target/iscsi/iscsi_target.c | 1 + > 1 file changed, 1 insertion(

Re: [PATCH] tcm_loop: Wrong I_T nexus association

2014-11-28 Thread Nicholas A. Bellinger
On Wed, 2014-11-26 at 14:58 +0100, Hannes Reinecke wrote: > tcm_loop has the I_T nexus associated with the HBA. This causes > commands to become misdirected if the HBA has more than one > target portal group; any command is then being sent to the > first target portal group instead of the correct o

[PATCH 06/16] target: Move dev_stat_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_stat_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets only ct_group_ops following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits, and dro

[PATCH 09/16] target: Add DEF_TB_DEFAULT_ATTRIBS macro for virtual device attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This helper macro adds the default set of 30 device attributes for virtual devices from existing target_core_configfs.c code, and moves the definitions into a single macro to create the structs necessary for backend drivers. It allows them to populate their own external

[PATCH 08/16] target: Add EXPORT_SYMBOL for existing se_dev_set_*

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that target_core_backend_configfs.h macros will be using these se_dev_set attribute functions externally to allow backend drivers to populate different attributes, go ahead and add EXPORT_SYMBOL() for the existing default set of 30 device attributes. Also update targ

[PATCH 07/16] target: Add target_core_backend_configfs.h helper macros

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a number of configfs e-attr macros following what existing target_core_configfs.c code does for internal target_backend_dev_attrib setup, and similar to how target fabric drivers allow for external config_item_type + cit->ct_attrs. assignment. This is use

[PATCH 13/16] target/user: Convert to external tcmu_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts TCM-USER to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on

[PATCH 02/16] target: Move dev_attrib_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_attrib_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_ci

[PATCH 04/16] target: Move dev_wwn_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_wwn_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits,

[PATCH 03/16] target: Move dev_pr_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_pr_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets both ct_item_ops + ct_attr following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_cits,

[PATCH 05/16] target: Move dev_alua_tg_pt_gps_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for dev_alua_tg_pt_gps_cit as an external config_item_type using TB_CIT_SETUP() helper macro, and sets only ct_group_ops following existing code. It updates target_core_make_subdev() + target_core_setup_dev_attrib_cit() + struct target_backend_ci

[PATCH 12/16] target/rd: Convert to external rd_mcp_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts RAMDISK to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on

[PATCH 10/16] target/iblock: Convert to external iblock_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts IBLOCK to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on e

[PATCH 00/16] target: Use external CITs for backend devices

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, This series addresses a long standing limitation going back to early LIO v3.x days, where all TCM backend devices originally used local scope struct config_item_types in target_core_configfs.c code that resulted in same /sys/kernel/config/target/core/$HBA/$DEV/at

[PATCH 15/16] target: Drop left-over internal dev attribute code

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that backend drivers are populating their own device attributes, go ahead and remove left-over definitions + internal attribute list of device attributes from target_core_configfs.c code Also update TB_CIT_SETUP(dev_attrib,...) to signal ct_attr = NULL. Signed-off-b

[PATCH 11/16] target/file: Convert to external fileio_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts FILEIO to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on e

[PATCH 01/16] target: Move dev_cit to struct se_subsystem_api

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds initial support for dev_cit as external config_item_type. This includes a new struct target_backend_cits to hold the external CITs within struct se_subsystem_api, and target_core_setup_sub_cits() to be used by backend drivers ahead of transport_subsystem_

[PATCH 16/16] target: Drop left-over PHBA_PDEV set attr checks

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that PSCSI is only exposing four hw_* read-only device attributes, go ahead and drop the left-over -> legacy PHBA_PDEV checks in various se_dev_set_* code, since it's now only used by virtual devices. Signed-off-by: Nicholas Bellinger --- drivers/target/target_core

[PATCH 14/16] target/pscsi: Convert to external pscsi_backend_dev_attrs

2014-11-28 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts PSCSI to use an external set of device attributes, and utilizes target_core_backend_configfs.h macros to generate a default set of configfs extended-attr handlers. It calls target_core_setup_sub_cits() to setup the initial config_item_type based on ex

Re: [PATCH 1/1] target: Deletion of unnecessary checks before the function call "module_put"

2014-11-21 Thread Nicholas A. Bellinger
On Fri, 2014-11-21 at 10:30 +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Fri, 21 Nov 2014 10:25:45 +0100 > > The module_put() function tests whether its argument is NULL and then > returns immediately. Thus the test around the call is not needed. > > This issue was detected by

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

2014-11-20 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes queued for v3.18-rc6. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master The highlights include: - target-core OOPs fix with tcm_qla2xxx + vxworks FC initiators + zero length SCSI command

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

2014-11-20 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes queued for v3.18-rc6. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master The highlights include: - target-core OOPs fix with tcm_qla2xxx + vxworks FC initiators + zero length SCSI command

Re: [PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT

2014-10-21 Thread Nicholas A. Bellinger
Hey Paolo, On Thu, 2014-10-09 at 12:49 +0200, Paolo Bonzini wrote: > Il 09/10/2014 10:49, Paolo Bonzini ha scritto: > > > > It does not happen if you close QEMU with SIGTERM, ctrl-c, or with the > > "quit" command, because no attempt is done to bring down the VM data > > structures (or free memor

Re: [GIT PULL] target updates for v3.18-rc2

2014-10-21 Thread Nicholas A. Bellinger
On Tue, 2014-10-21 at 12:24 +0300, Sagi Grimberg wrote: > On 10/21/2014 2:39 AM, Nicholas A. Bellinger wrote: > > Hi Linus, > > > > Here are the target updates for v3.18-rc2 code. These where originally > > destined for -rc1, but due to the combination of travel last we

[GIT PULL] target updates for v3.18-rc2

2014-10-20 Thread Nicholas A. Bellinger
Hi Linus, Here are the target updates for v3.18-rc2 code. These where originally destined for -rc1, but due to the combination of travel last week for KVM Forum and my mistake of taking the three week merge window literally, the pull request slipped.. Apologies for that. A heads-up that you'll

Re: [PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT

2014-10-08 Thread Nicholas A. Bellinger
Hi MST & Co, Quick question below wrt to this patch.. On Thu, 2014-10-09 at 03:34 +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch addresses a bug where individual vhost-scsi configfs endpoint > groups can be removed from below while active

[PATCH] vhost-scsi: Take configfs group dependency during VHOST_SCSI_SET_ENDPOINT

2014-10-08 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses a bug where individual vhost-scsi configfs endpoint groups can be removed from below while active exports to QEMU userspace still exist, resulting in an OOPs. It adds a configfs_depend_item() in vhost_scsi_set_endpoint() to obtain an explicit depende

Re: [PATCH] target/file: fix inclusive vfs_fsync_range() end

2014-10-07 Thread Nicholas A. Bellinger
On Mon, 2014-10-06 at 16:40 -0700, Zach Brown wrote: > Both of the file target's calls to vfs_fsync_range() got the end offset > off by one. The range is inclusive, not exclusive. It would sync a bit > more data than was required. > > The sync path already tested the length of the range and fell

Re: [PATCH] iser-target: Disable TX completion interrupt coalescing

2014-10-07 Thread Nicholas A. Bellinger
On Tue, 2014-10-07 at 09:58 +0300, Sagi Grimberg wrote: > On 10/6/2014 5:15 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch explicitly disables TX completion interrupt coalescing logic > > in isert_put_response() and isert_put_datain(

[PATCH] iser-target: Disable TX completion interrupt coalescing

2014-10-05 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch explicitly disables TX completion interrupt coalescing logic in isert_put_response() and isert_put_datain() that was originally added as an efficiency optimization in commit 95b60f07. It has been reported that this change can trigger ABORT_TASK timeouts under

[PATCH 1/2] target: Fix APTPL metadata handling for dynamic MappedLUNs

2014-10-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch fixes a bug in handling of SPC-3 PR Activate Persistence across Target Power Loss (APTPL) logic where re-creation of state for MappedLUNs from dynamically generated NodeACLs did not occur during I_T Nexus establishment. It adds the missing core_scsi3_check_apt

[PATCH 2/2] target: Add force_pr_aptpl device attribute

2014-10-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a force_pr_aptpl device attribute used to force SPC-3 PR Activate Persistence across Target Power Loss (APTPL) operation. This makes PR metadata write-out occur during state change regardless if new PERSISTENT_RESERVE_OUT CDBs have their APTPL feature bit

Re: [PATCH] tcm_loop: Fixup tag handling

2014-10-02 Thread Nicholas A. Bellinger
On Thu, 2014-10-02 at 09:30 +0200, Hannes Reinecke wrote: > The SCSI command tag is set to the tag assigned from the block > layer, not the SCSI-II tag message. So we need to convert > it into the correct SCSI-II tag message based on the > device flags, not the tag value itself. > > Signed-off-by:

Re: [PATCH RESEND 2/2] target: Implement report lun data change unit attention.

2014-10-01 Thread Nicholas A. Bellinger
Hi Saurav & Co, Comments are inline below. On Thu, 2014-09-25 at 06:22 -0400, Saurav Kashyap wrote: > Signed-off-by: Saurav Kashyap > Signed-off-by: Giridhar Malavali > --- > drivers/target/target_core_fabric_configfs.c | 28 > ++ > 1 files changed, 28 insertions(+),

Re: [PATCH RESEND 1/2] Target/transport: SCSI Status Respond being sent to Initiator twice.

2014-10-01 Thread Nicholas A. Bellinger
Hi Saurav, Apologies for the delayed response, comments are below. On Thu, 2014-09-25 at 06:22 -0400, Saurav Kashyap wrote: > From: Quinn Tran > > During temporary resource starvation at lower transport layer, command > is placed on queue full retry path, which expose this problem. The TCM > Q

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-22 Thread Nicholas A. Bellinger
On Mon, 2014-09-22 at 14:00 -0700, Andy Grover wrote: > On 09/22/2014 01:58 PM, Nicholas A. Bellinger wrote: > > So I'd still like to start for an initial merge with the two different > > modes mentioned earlier. The pure-passthrough mode where everything is > > handled

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-22 Thread Nicholas A. Bellinger
On Fri, 2014-09-19 at 17:35 -0700, Andy Grover wrote: > On 09/19/2014 04:51 PM, Alex Elsayed wrote: > > >> Not sure I follow.. How does the proposed passthrough mode prevent > >> someone from emulating OSDs, media changers, optical disks or anything > >> else in userspace with TCMU..? > >> > >> T

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-22 Thread Nicholas A. Bellinger
On Fri, 2014-09-19 at 16:51 -0700, Alex Elsayed wrote: > Nicholas A. Bellinger wrote: > > > On Fri, 2014-09-19 at 14:43 -0700, Alex Elsayed wrote: > >> Nicholas A. Bellinger wrote: > >> > >> > >> > So the idea of allowing the in-kernel CDB em

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Nicholas A. Bellinger
On Fri, 2014-09-19 at 14:43 -0700, Alex Elsayed wrote: > Nicholas A. Bellinger wrote: > > > > So the idea of allowing the in-kernel CDB emulation to run after > > user-space has returned unsupported opcode is problematic for a couple > > of different reasons. >

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

2014-09-19 Thread Nicholas A. Bellinger
Hi Linus, Here are the target pending fixes for v3.17-rc6. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master Included are Sagi's long overdue fixes related to iser-target shutdown, along with a couple of fixes from Sebastian related to ALUA Referral

Re: [PATCH 4/4] target: Add a user-passthrough backstore

2014-09-19 Thread Nicholas A. Bellinger
Hi Andy, A few comments are inline below. On Mon, 2014-09-15 at 16:12 -0700, Andy Grover wrote: > Add a LIO storage engine that presents commands to userspace for execution. > This would allow more complex backstores to be implemented out-of-kernel, > and also make experimentation a-la FUSE (but

Re: [PATCHv3 0/8] target: Save memory on unused se_dev_entrys and se_luns

2014-09-18 Thread Nicholas A. Bellinger
On Thu, 2014-09-18 at 15:54 -0700, Andy Grover wrote: > On 09/18/2014 12:38 AM, Nicholas A. Bellinger wrote: > > On Sat, 2014-09-13 at 21:55 +0200, Christoph Hellwig wrote: > >> ping again. We're getting closer to the end of the 3.18 merge window > >> and th

Re: [PATCHv3 0/8] target: Save memory on unused se_dev_entrys and se_luns

2014-09-18 Thread Nicholas A. Bellinger
On Sat, 2014-09-13 at 21:55 +0200, Christoph Hellwig wrote: > On Tue, Jul 29, 2014 at 03:15:11PM +0200, Christoph Hellwig wrote: > > Nic, > > > > any progress on looking over these? Seems like there's actually > > nothing at all queued up for 3.17 in the target tree, or am І missing > > something

[GIT PULL] target updates for v3.17-rc3

2014-08-31 Thread Nicholas A. Bellinger
Hi Linus, Here are the target pending updates for v3.17-rc3. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Note that these patches where originally intended for -rc1, but missed the merge window. They are mostly iser-target relat

Re: [PATCH V5 0/5] Add XEN pvSCSI support

2014-08-22 Thread Nicholas A. Bellinger
Hi Juergen & Co, On Mon, 2014-08-18 at 11:31 +0200, jgr...@suse.com wrote: > This series adds XEN pvSCSI support. With pvSCSI it is possible to use > physical > SCSI devices from a XEN domain. > > The support consists of a backend in the privileged Domain-0 doing the real > I/O and a frontend in

Re: [PATCH] drivers: target: target_core_ua_h: Add #define of include guard

2014-08-22 Thread Nicholas A. Bellinger
Hi Rasmus, On Fri, 2014-08-22 at 14:54 +0200, Rasmus Villemoes wrote: > Clearly the file was meant to contain an include guard, but it was > missing the #define part. > > Signed-off-by: Rasmus Villemoes > --- > drivers/target/target_core_ua.h | 1 + > 1 file changed, 1 insertion(+) > > diff --

Re: [PATCH] tcm_fc: Replace rcu_assign_pointer() with RCU_INIT_POINTER()

2014-08-22 Thread Nicholas A. Bellinger
Hi Andreea-Cristina, On Mon, 2014-08-18 at 15:05 +0300, Andreea-Cristina Bernat wrote: > The use of "rcu_assign_pointer()" is NULLing out the pointer. > According to RCU_INIT_POINTER()'s block comment: > "1. This use of RCU_INIT_POINTER() is NULLing out the pointer" > it is better to use it inst

Re: [PATCH] target: target_core_transport.c: Cleaning up missing null-terminate in conjunction with strncpy

2014-08-22 Thread Nicholas A. Bellinger
Hi Rickard, On Sun, 2014-08-03 at 23:50 +0200, Rickard Strandqvist wrote: > Ensures that the string is null-terminate in connection with the > use of strncpy. Optimized code by replacing unnecessary sprintf > with strlcat and more, and simultaneously guarantees that the > string does not get bigge

Re: [Xen-devel] [PATCH V4 3/4] Introduce XEN scsiback module

2014-08-16 Thread Nicholas A. Bellinger
On Thu, 2014-08-14 at 12:14 +0200, Juergen Gross wrote: > On 08/14/2014 10:53 AM, Juergen Gross wrote: > > Nicholas, > > > > just one more question (see below): > > > > On 08/12/2014 11:13 PM, Nicholas A. Bellinger wrote: > >> Hi Juergen & Co, >

Re: Re: [Xen-devel] [PATCH V4 3/4] Introduce XEN scsiback module

2014-08-16 Thread Nicholas A. Bellinger
On Thu, 2014-08-14 at 06:34 +0200, Juergen Gross wrote: > On 08/13/2014 09:02 AM, Juergen Gross wrote: > > On 08/12/2014 11:13 PM, Nicholas A. Bellinger wrote: > >> Hi Juergen & Co, > >> > >> Finally had a chance to review this code. Comments are inline bel

Re: [PATCH V4 3/4] Introduce XEN scsiback module

2014-08-16 Thread Nicholas A. Bellinger
On Wed, 2014-08-13 at 09:02 +0200, Juergen Gross wrote: > On 08/12/2014 11:13 PM, Nicholas A. Bellinger wrote: > > > >> + > >> +static int scsiback_port_link(struct se_portal_group *se_tpg, > >> + struct se_lun *lun) >

Re: [PATCH V4 3/4] Introduce XEN scsiback module

2014-08-12 Thread Nicholas A. Bellinger
Hi Juergen & Co, Finally had a chance to review this code. Comments are inline below.. On Fri, 2014-08-08 at 09:49 +0200, jgr...@suse.com wrote: > From: Juergen Gross > > Introduces the XEN pvSCSI backend. With pvSCSI it is possible for a XEN domU > to issue SCSI commands to a SCSI LUN assigne

Re: [PATCH RFC 0/2] percpu_tags: Prototype implementation

2014-08-11 Thread Nicholas A. Bellinger
On Mon, 2014-08-11 at 13:52 -0700, Nicholas A. Bellinger wrote: > (Responding again without gmail, as the last email hit a failure when > responding to the lists..) > > On Mon, 2014-08-11 at 16:17 -0400, Alexander Gordeev wrote: > > On Fri, Jul 18, 2014 at 12:20:56PM +0200,

Re: [PATCH RFC 0/2] percpu_tags: Prototype implementation

2014-08-11 Thread Nicholas A. Bellinger
(Responding again without gmail, as the last email hit a failure when responding to the lists..) On Mon, 2014-08-11 at 16:17 -0400, Alexander Gordeev wrote: > On Fri, Jul 18, 2014 at 12:20:56PM +0200, Alexander Gordeev wrote: > > The performance test is not decent, though. I used "fio" random > >

Re: [PATCH] target/configfs: Remove unnecessary null test

2014-07-29 Thread Nicholas A. Bellinger
Hi Himangi, On Thu, 2014-07-17 at 02:29 +0530, Himangi Saraogi wrote: > This patch removes the null test on lun_cg. lun_cg is initialized > at the beginning of the function to &lun->lun_group. Since lun_cg is > dereferenced prior to the null test, it must be a valid pointer. > > The following Coc

Re: [PATCH 3.15 099/139] libiscsi, iser: Adjust data_length to include protection information

2014-07-02 Thread Nicholas A. Bellinger
On Wed, 2014-07-02 at 17:19 -0600, Alex Williamson wrote: > On Wed, 2014-07-02 at 15:52 -0700, James Bottomley wrote: > > On Wed, 2014-07-02 at 17:44 -0500, Mike Christie wrote: > > > On 07/02/2014 05:15 PM, Alex Williamson wrote: > > > > On Sat, 2014-06-28 at 10:47 -0700, Greg Kroah-Hartman wrote:

[GIT PULL] target fixes for v3.16-rc3

2014-06-28 Thread Nicholas A. Bellinger
Hi Linus, Here are the target-pending fixes for v3.16-rc3. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master Mostly minor fixes this time around. The highlights include: - iscsi-target CHAP authentication fixes to enforce explicit k

Re: [PATCH] target: fix deadlock on unload

2014-06-27 Thread Nicholas A. Bellinger
On Fri, 2014-06-27 at 08:35 -0400, Mikulas Patocka wrote: > > On Thu, 26 Jun 2014, Nicholas A. Bellinger wrote: > > > Hi Mikulas, > > > > On Mon, 2014-06-23 at 13:42 -0400, Mikulas Patocka wrote: > > > target: fix deadlock on unload > > > > >

Re: [PATCH] target: fix deadlock on unload

2014-06-26 Thread Nicholas A. Bellinger
Hi Mikulas, On Mon, 2014-06-23 at 13:42 -0400, Mikulas Patocka wrote: > target: fix deadlock on unload > > On uniprocessor preemptible kernel, target core deadlocks on unload. The > following events happen: > * iscsit_del_np is called > * it calls send_sig(SIGINT, np->np_thread, 1); > * the sched

Re: [GIT PULL] target updates for v3.16-rc1

2014-06-13 Thread Nicholas A. Bellinger
On Fri, 2014-06-13 at 11:07 -0700, Nicholas A. Bellinger wrote: > On Fri, 2014-06-13 at 15:39 +0200, Christoph Hellwig wrote: > > On Thu, Jun 12, 2014 at 02:05:16PM -0700, Nicholas A. Bellinger wrote: > > > The first is with virtio-scsi between what has been merged in

Re: [GIT PULL] target updates for v3.16-rc1

2014-06-13 Thread Nicholas A. Bellinger
On Fri, 2014-06-13 at 15:39 +0200, Christoph Hellwig wrote: > On Thu, Jun 12, 2014 at 02:05:16PM -0700, Nicholas A. Bellinger wrote: > > The first is with virtio-scsi between what has been merged in scsi.git > > for "virtio_scsi: use cmd_size", and the "virtio-scs

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

2014-06-12 Thread Nicholas A. Bellinger
Hello Linus, Here are the target-pending updates for v3.16-rc1 code. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next Note that you'll need to 'thread the needle' this time around, as there are no less than four different merge confl

Re: [PATCH v1 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-11 Thread Nicholas A. Bellinger
On Wed, 2014-06-11 at 22:32 +, Quinn Tran wrote: > > On 6/11/14 2:30 PM, "Nicholas A. Bellinger" wrote: > > >On Wed, 2014-06-11 at 10:24 +0300, Sagi Grimberg wrote: > >> On 6/11/2014 12:17 AM, Quinn Tran wrote: > >> > >> > &

Re: [PATCH v2 0/3] Include protection information in transport header

2014-06-11 Thread Nicholas A. Bellinger
On Wed, 2014-06-11 at 12:09 +0300, Sagi Grimberg wrote: > At the SCSI transport level, there is no distinction between > user data and protection information. Thus, iscsi header field > "expected data transfer length" should include protection > information. > > Patch #1 introduces scsi helper scs

Re: [PATCH v1 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-11 Thread Nicholas A. Bellinger
On Wed, 2014-06-11 at 10:24 +0300, Sagi Grimberg wrote: > On 6/11/2014 12:17 AM, Quinn Tran wrote: > > > > > QT> Instead of using existing value within cmd->data_length, can we > > calculated data_length based on secstors & blocksize. > > > > cmd->data_length = sectors * dev->dev_attrib.block_si

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

2014-06-10 Thread Nicholas A. Bellinger
On Tue, 2014-06-10 at 13:56 -0700, Linus Torvalds wrote: > On Tue, Jun 10, 2014 at 1:25 PM, Nicholas A. Bellinger > wrote: > > > > That would work, or I can simply include a pointer to Stephen's patch in > > the target-pending PULL request after the vhost API changes

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

2014-06-10 Thread Nicholas A. Bellinger
On Tue, 2014-06-10 at 13:09 -0700, James Bottomley wrote: > On Tue, 2014-06-10 at 12:57 -0700, Nicholas A. Bellinger wrote: > > On Tue, 2014-06-10 at 21:45 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jun 10, 2014 at 10:39:17AM -0700, Nicholas A. Bellinger wrote: > > >

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

2014-06-10 Thread Nicholas A. Bellinger
On Tue, 2014-06-10 at 22:35 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 10, 2014 at 10:39:17AM -0700, Nicholas A. Bellinger wrote: > > On Tue, 2014-06-10 at 16:02 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote:

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

2014-06-10 Thread Nicholas A. Bellinger
On Tue, 2014-06-10 at 21:45 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 10, 2014 at 10:39:17AM -0700, Nicholas A. Bellinger wrote: > > On Tue, 2014-06-10 at 16:02 +0300, Michael S. Tsirkin wrote: > > > On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote:

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

2014-06-10 Thread Nicholas A. Bellinger
On Tue, 2014-06-10 at 16:02 +0300, Michael S. Tsirkin wrote: > On Tue, Jun 10, 2014 at 09:52:17PM +1000, Stephen Rothwell wrote: > > Hi Michael, > > > > On Tue, 10 Jun 2014 12:42:54 +0300 "Michael S. Tsirkin" > > wrote: > > > > > > So I see two options: > > > - I go ahead with my changes and you

Re: [PATCH v1 0/3] Include protection information in iscsi header

2014-06-10 Thread Nicholas A. Bellinger
Hi MKP + Mike + Roland, On Sun, 2014-06-08 at 13:27 +0300, Sagi Grimberg wrote: > At the SCSI transport level, there is no distinction between > user data and protection information. Thus, iscsi header field > "expected data transfer length" should include protection > information. > > Patch #1 i

Re: [PATCH v1 3/3] TARGET/sbc,loopback: Adjust command data length in case pi exists on the wire

2014-06-10 Thread Nicholas A. Bellinger
Hi Sagi & Co, On Sun, 2014-06-08 at 13:27 +0300, Sagi Grimberg wrote: > In various areas of the code, it is assumed that > se_cmd->data_length describes pure data. In case > that protection information exists over the wire > (protect bits is are on) the target core decrease > the protection length

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

2014-06-10 Thread Nicholas A. Bellinger
On Sun, 2014-06-08 at 19:05 +0300, Michael S. Tsirkin wrote: > On Thu, May 22, 2014 at 02:26:16AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi MST, MKP, Paolo & Co, > > > > Here is the v2 patch series for adding T1O protection

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

2014-06-10 Thread Nicholas A. Bellinger
On Mon, 2014-06-09 at 16:30 +0300, Michael S. Tsirkin wrote: > On Thu, May 22, 2014 at 02:26:16AM +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi MST, MKP, Paolo & Co, > > > > Here is the v2 patch series for adding T1O protection

[GIT PULL] target fixes for v3.15

2014-06-07 Thread Nicholas A. Bellinger
Hi Linus, Here are the remaining fixes for v3.15. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This series includes: - iser-target fix for ImmediateData exception reference count bug (Sagi + nab) - iscsi-target fix for MC/S lo

Re: [PATCH 2/2] tcm_fc: Generate TASK_SET_FULL status for response failures

2014-06-06 Thread Nicholas A. Bellinger
On Fri, 2014-06-06 at 14:03 -0700, Vasu Dev wrote: > On Thu, 2014-06-05 at 23:30 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch changes ft_queue_status() to set SAM_STAT_TASK_SET_FULL > > status upon lport->tt.seq_send( failure

Re: [PATCH 0/2] tcm_fc: Generate TASK_SET_FULL for DataIN + response failures

2014-06-06 Thread Nicholas A. Bellinger
On Fri, 2014-06-06 at 13:38 -0700, Vasu Dev wrote: > On Thu, 2014-06-05 at 23:30 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi Vasu, > > > > This series generates SAM_STAT_TASK_SET_FULL status for lport->tt.seq_send() >

Re: [PATCH 1/2] tcm_fc: Generate TASK_SET_FULL status for DataIN failures

2014-06-06 Thread Nicholas A. Bellinger
On Fri, 2014-06-06 at 13:51 -0700, Vasu Dev wrote: > On Thu, 2014-06-05 at 23:30 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > This patch changes ft_queue_data_in() to set SAM_STAT_TASK_SET_FULL > > status upon a lport->tt.seq_send() f

[PATCH 1/2] tcm_fc: Generate TASK_SET_FULL status for DataIN failures

2014-06-05 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes ft_queue_data_in() to set SAM_STAT_TASK_SET_FULL status upon a lport->tt.seq_send() failure, where it will now stop sending subsequent DataIN, and immediately attempt to send the response with exception status. Sending a response with SAM_STAT_TASK_SET

[PATCH 0/2] tcm_fc: Generate TASK_SET_FULL for DataIN + response failures

2014-06-05 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi Vasu, This series generates SAM_STAT_TASK_SET_FULL status for lport->tt.seq_send() failures in DataIN + response status codepaths, which is done in order to get the initiator to reduce it's current queue_depth thus reducing the number of outstanding I/Os permitted in

[PATCH 2/2] tcm_fc: Generate TASK_SET_FULL status for response failures

2014-06-05 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes ft_queue_status() to set SAM_STAT_TASK_SET_FULL status upon lport->tt.seq_send( failure, and return -EAGAIN to notify target-core to attempt to requeue the response. It also does the same for a fc_frame_alloc() failures, in order to signal the initiato

Re: [PATCH] qla2xxx: Convert to percpu_ida session tag pre-allocation

2014-06-02 Thread Nicholas A. Bellinger
On Mon, 2014-06-02 at 23:32 +, Quinn Tran wrote: > Regards, > Quinn Tran > > > > > On 6/2/14 3:12 PM, "Nicholas A. Bellinger" wrote: > > >> > >>Extra size note, the true value should be extracted from > >>"ha

Re: [PATCH] qla2xxx: Convert to percpu_ida session tag pre-allocation

2014-06-02 Thread Nicholas A. Bellinger
On Thu, 2014-05-29 at 20:29 +, Quinn Tran wrote: > On 5/23/14 7:33 PM, "Nicholas A. Bellinger" wrote: > >> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c > >>b/drivers/scsi/qla2xxx/tcm_qla2xxx.c > >> index 68fb66f..34db344 100644 > >> --

Re: [PATCH 6/6] [SCSI] sd: Implement copy offload support

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > Implement support for hardware copy offload. This initial implementation > only supports EXTENDED COPY(LID1). If need be we can add support for > LID4 or token copy at a later date. > > If a device has the 3PC flag set in the standard

Re: [PATCH 5/6] [SCSI] Look up and store NAA if VPD page 0x83 is present

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > Copy offloading requires us to know the NAA descriptor for both source > target device. This descriptor is mandatory in the Device Identification > VPD page. Locate this descriptor in the returned VPD data so we don't > have to do looku

Re: [PATCH 4/6] block: Copy offload ioctl

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > Add an ioctl which can be used to clone a block range within a single > block device. This is useful for testing the copy offload code. > > Signed-off-by: Martin K. Petersen > --- > block/ioctl.c | 35 ++

Re: [PATCH 3/6] block: Introduce copy offload library function

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > blkdev_issue_copy() is a library function that filesystems can use to > clone block ranges between devices that support copy offloading. Both > source and target device must have max_copy_sectors > 0 in the queue > limits. > > blkdev_i

Re: [PATCH 2/6] block: Implement support for copy offload operations

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > Many modern SCSI devices support copy offloading operations in which one > can copy a block range from one LUN to another without the need for data > to be copied sent to the host and back. This is particularly useful for > things like

Re: [PATCH 1/6] block: Replace bi_integrity with bi_special

2014-06-02 Thread Nicholas A. Bellinger
On Wed, 2014-05-28 at 23:52 -0400, Martin K. Petersen wrote: > For commands like REQ_COPY we need a way to pass extra information along > with each bio. Like integrity metadata this information must be > available at the bottom of the stack so bi_private does not suffice. > > Rename the existing b

Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-27 Thread Nicholas A. Bellinger
On Mon, 2014-05-26 at 13:30 -0400, Martin K. Petersen wrote: > >>>>> "Nic" == Nicholas A Bellinger writes: > > >> What about #ifdef'ing VIRTIO_SCSI_F_T10_PI support out if > >> !CONFIG_BLK_DEV_INTEGRITY? > > Nic> I figured it was

Re: [PATCH] qla2xxx: Convert to percpu_ida session tag pre-allocation

2014-05-23 Thread Nicholas A. Bellinger
Hi Qlogic folks, A question for you below.. On Sat, 2014-05-24 at 00:43 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > This patch converts qla2xxx target code to use generic percpu_ida > tag allocation provided by target-core, thus removing the original > km

[PATCH] qla2xxx: Convert to percpu_ida session tag pre-allocation

2014-05-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts qla2xxx target code to use generic percpu_ida tag allocation provided by target-core, thus removing the original kmem_cache_zalloc() for each struct qla_tgt_cmd descriptor in the incoming ATIO packet fast-path. This includes the conversion of qlt_hand

[PATCH] iser-target: Add missing target_put_sess_cmd for ImmedateData failure

2014-05-23 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch addresses a bug where an early exception for SCSI WRITE with ImmediateData=Yes was missing the target_put_sess_cmd() call to drop the extra se_cmd->cmd_kref reference obtained during the normal iscsit_setup_scsi_cmd() codepath execution. This bug was manifesti

Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-23 Thread Nicholas A. Bellinger
On Fri, 2014-05-23 at 11:20 +0200, Paolo Bonzini wrote: > Il 22/05/2014 22:46, Nicholas A. Bellinger ha scritto: > > Hi Fengguang, > > > > On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote: > >> tree: > >> git://git.kernel.org/pub/scm/linux/kern

Re: [PATCH 39/42] qla2xxx: ABTS cause double free of qla_tgt_cmd +.

2014-05-22 Thread Nicholas A. Bellinger
Hi Saurav + Quinn, Just curious if this fix needs to be CC'ed to stable as well, or if it's something that is only triggered with the preceding T10 DIF support patch in place..? --nab On Fri, 2014-04-11 at 16:54 -0400, Saurav Kashyap wrote: > From: Quinn Tran > > Fix double free problem within

[PATCH-scsi-for-next] tcm_qla2xxx: Set correct protection flags when DIF/DIX is enabled

2014-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With the advent of per session protection flags in v3.15-rc1 code, a target fabric driver supporting T10 PI needs to declare it's own protection capabilities at transport_init_session() time. This patch updates tcm_qla2xxx_check_initiator_node_acl() to extract the T10 PI

Re: [target:for-next 20/20] drivers/scsi/virtio_scsi.c:531:48: error: dereferencing pointer to incomplete type

2014-05-22 Thread Nicholas A. Bellinger
Hi Fengguang, On Thu, 2014-05-22 at 11:13 +0800, kbuild test robot wrote: > tree: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git > for-next > head: 4baaa7d589e24bfe87dfd6c7a1229108be404a28 > commit: 4baaa7d589e24bfe87dfd6c7a1229108be404a28 [20/20] virtio-scsi: Enable >

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