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

2014-10-03 Thread Nicholas A. Bellinger
On Fri, 2014-10-03 at 15:46 +1000, Stephen Rothwell wrote: > Hi Nicholas, > > After merging the target-updates tree, today's linux-next build (x86_64 > allmodconfig) failed like this: > > drivers/target/target_core_user.c: In function 'tcmu_netlink_event': > drivers/target/target_core_user.c:780:

Re: [PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list usage

2015-08-25 Thread Nicholas A. Bellinger
Hi Calvin, On Thu, 2015-08-13 at 18:48 -0700, Calvin Owens wrote: > These objects can be referenced concurrently throughout the driver, we > need a way to make sure threads can't delete them out from under each > other. This patch adds the refcount, and refactors the code to use it. > > Additiona

Re: [PATCH v4 2/2] mpt2sas: Refcount fw_events and fix unsafe list usage

2015-08-25 Thread Nicholas A. Bellinger
On Thu, 2015-08-13 at 18:48 -0700, Calvin Owens wrote: > The fw_event_work struct is concurrently referenced at shutdown, so > add a refcount to protect it, and refactor the code to use it. > > Additionally, refactor _scsih_fw_event_cleanup_queue() such that it > no longer iterates over the list w

Re: [PATCH v4 0/2] Fixes for memory corruption in mpt2sas

2015-08-25 Thread Nicholas A. Bellinger
On Thu, 2015-08-13 at 18:48 -0700, Calvin Owens wrote: > Hello all, > > This patchset attempts to address problems we've been having with > panics due to memory corruption from the mpt2sas driver. > > Thanks, > Calvin > > > [PATCH v4 1/2] mpt2sas: Refcount sas_device objects and fix unsafe list

[PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi James & Co, This series is a mpt3sas forward port of Calvin Owens' in-flight reference counting bugfixes for mpt2sas LLD code here: [PATCH v4 0/2] Fixes for memory corruption in mpt2sas http://marc.info/?l=linux-scsi&m=143951695904115&w=2 The differences between mpt

[PATCH 2/2] mpt3sas: Refcount fw_events and fix unsafe list usage

2015-08-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger The fw_event_work struct is concurrently referenced at shutdown, so add a refcount to protect it, and refactor the code to use it. Additionally, refactor _scsih_fw_event_cleanup_queue() such that it no longer iterates over the list without holding the lock, since _firmwa

[PATCH 1/2] mpt3sas: Refcount sas_device objects and fix unsafe list usage

2015-08-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger These objects can be referenced concurrently throughout the driver, we need a way to make sure threads can't delete them out from under each other. This patch adds the refcount, and refactors the code to use it. Additionally, we cannot iterate over the sas_device_list wi

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-26 Thread Nicholas A. Bellinger
On Wed, 2015-08-26 at 16:54 -0700, Calvin Owens wrote: > On Wednesday 08/26 at 04:09 +0000, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > Hi James & Co, > > > > This series is a mpt3sas forward port of Calvin Owens' in-flight >

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread Nicholas A. Bellinger
Hi Sreekanth, On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: > HI Nicholas & Calvin, > > Thanks for the patchset. Sure We will review and we do some unit > testing on this patch series. Currently my bandwidth is occupied with > some internal activity, so by end of next week I will ackn

Re: [PATCH 0/2] mpt3sas: Reference counting fixes from in-flight mpt2sas

2015-08-27 Thread Nicholas A. Bellinger
On Thu, 2015-08-27 at 07:40 -0700, James Bottomley wrote: > On Thu, 2015-08-27 at 10:37 +0530, Sreekanth Reddy wrote: > > HI Nicholas & Calvin, > > > > Thanks for the patchset. Sure We will review and we do some unit > > testing on this patch series. Currently my bandwidth is occupied with > > som

[GIT PULL] target fixes for v4.2-rc5

2015-07-28 Thread Nicholas A. Bellinger
Hi Linus, Here are the outstanding target-pending fixes for v4.2-rc5 code. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This series is larger than what I'd normally be conformable with sending for a -rc5 PULL request.. However, th

Re: [PATCH] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT

2015-07-30 Thread Nicholas A. Bellinger
Hi Spencer & Alexei, On Tue, 2015-07-21 at 15:07 -0700, Spencer Baugh wrote: > From: Alexei Potashnik > > Make sure all non-READ SCSI commands get targ_xfer_tag initialized > to 0x, not just WRITEs. > > Double-free of a TUR cmd object occurs under the following scenario: > > 1. TUR rec

Re: [PATCH] target/iscsi: fix digest computation for chained SGs

2015-07-30 Thread Nicholas A. Bellinger
On Tue, 2015-07-21 at 18:38 -0700, Roland Dreier wrote: > On Tue, Jul 21, 2015 at 1:57 AM, Sagi Grimberg > wrote: > > How were you able to get a chained SG list in the target code? > > Local hack. So this bug can't be hit in current mainline code, but > patch improves the code and removes a hid

Re: [PATCH] target: allow underflow/overflow for PR OUT etc. commands

2015-07-30 Thread Nicholas A. Bellinger
On Wed, 2015-07-22 at 15:08 -0700, Spencer Baugh wrote: > From: Roland Dreier > > It's not necessarily a fatal error if a command with a data-out phase > has a data length that differs from the transport data length (e.g. > PERSISTENT RESERVE OUT might have a parameter list length in the CDB > th

Re: [PATCH] target: improve unsupported opcode message

2015-07-30 Thread Nicholas A. Bellinger
On Wed, 2015-07-22 at 15:01 -0700, Spencer Baugh wrote: > From: Joern Engel > > Make the warning about unsupported SCSI opcode more useful: > > - Add in the initiator name so we know who's sending it. > - Print the warning even for opcodes that spc_parse_cdb() knows about >but that we don'

Re: [PATCH] target: add support for START_STOP_UNIT SCSI opcode

2015-07-30 Thread Nicholas A. Bellinger
On Thu, 2015-07-23 at 15:27 -0700, Spencer Baugh wrote: > From: Brian Bunker > > AIX servers using VIOS servers that virtualize FC cards will have a > problem booting without support for START_STOP_UNIT. > > v2: Cite sb3r36 exactly, clean up if conditions > > Signed-off-by: Brian Bunker > Sign

Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-24 Thread Nicholas A. Bellinger
On Fri, 2015-07-24 at 12:52 +0200, Christoph Hellwig wrote: > On Thu, Jul 23, 2015 at 03:19:32PM -0700, Spencer Baugh wrote: > > From: Alexei Potashnik > > > > If command didn't match a LUN and we're sending check condition, the > > target_cmd_complete ftrace point will crash because it assumes t

Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-25 Thread Nicholas A. Bellinger
On Sat, 2015-07-25 at 08:48 +0200, Christoph Hellwig wrote: > On Fri, Jul 24, 2015 at 01:32:14PM -0700, Nicholas A. Bellinger wrote: > > We've already been through this discussion a couple of years back when > > target_submit_cmd() first came into existence. > > > &

[GIT PULL] target fixes for v4.2-rc7

2015-08-18 Thread Nicholas A. Bellinger
Hi Linus, Here are the outstanding target-pending fixes for v4.2-rc7 code. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master It contains a v4.2-rc specific RCU module unload regression bug-fix, a long-standing iscsi-target bug-fix for duplicate targ

Re: [PATCH] target: Fix handling of small allocation lengths in REPORT LUNS

2015-08-13 Thread Nicholas A. Bellinger
Hi Spencer & Co, On Wed, 2015-08-12 at 23:05 -0700, Spencer Baugh wrote: > From: Roland Dreier > > REPORT LUNS should not fail just because the allocation length is less > than 16. The relevant section of SPC-4 is: > > 4.2.5.6 Allocation length > > The ALLOCATION LENGTH field specifies th

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-23 Thread Nicholas A. Bellinger
On Wed, 2016-05-18 at 14:35 -0500, Michael Cyr wrote: > On 5/18/16 12:53 AM, Nicholas A. Bellinger wrote: > > Hi Michael, > > > > On Fri, 2016-05-13 at 17:15 -0500, Michael Cyr wrote: > >> If a command with a Simple task attribute is failed due to a Unit > >&g

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-23 Thread Nicholas A. Bellinger
Hi Bryant, On Mon, 2016-05-23 at 19:17 -0400, Bryant G Ly wrote: > Quoting "Nicholas A. Bellinger" : > > > > > > So AFAICT for delayed commands, the above patch ends up skipping these > > three checks subsequently when doing __target_execute_cmd() directly

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-17 Thread Nicholas A. Bellinger
Hi Michael, On Fri, 2016-05-13 at 17:15 -0500, Michael Cyr wrote: > If a command with a Simple task attribute is failed due to a Unit > Attention, then a subsequent command with an Ordered task attribute will > hang forever. The reason for this is that the Unit Attention status is > checked for i

[GIT PULL] target updates for v4.7-rc1

2016-05-27 Thread Nicholas A. Bellinger
Hi Linus, Here are the outstanding target pending updates for v4.7-rc1. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next The highlights this round include: - Allow external PR/ALUA metadata path be defined at runtime via top level

[GIT PULL] target updates for v4.4-rc1

2015-11-13 Thread Nicholas A. Bellinger
Hello Linus, Apologies for the late PULL request. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next This series contains HCH's changes to absorb configfs attribute ->show() + ->store() function pointer usage from it's original tree-wide consumers,

[GIT PULL] target updates for v4.4-rc1

2015-11-13 Thread Nicholas A. Bellinger
Hello Linus, Apologies for the late PULL request. Please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next This series contains HCH's changes to absorb configfs attribute ->show() + ->store() function pointer usage from it's original tree-wide consumers,

Re: [GIT PULL] target updates for v4.4-rc1

2015-11-13 Thread Nicholas A. Bellinger
On Fri, 2015-11-13 at 09:48 -0800, Linus Torvalds wrote: > On Fri, Nov 13, 2015 at 1:59 AM, Nicholas A. Bellinger > wrote: > > > > Please pull from: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git > > for-next > > Ok, not

[GIT PULL] target updates for v4.4-rc1 (-v2)

2015-11-13 Thread Nicholas A. Bellinger
Hi Linus, Here is the (late) target-updates for v4.4-rc1. There is one build failure as reported by linux-next in hwtracing/stm to expect after merging: https://lkml.org/lkml/2015/10/6/1016 That has been fixed-up to use the new configfs attribute API by Alexander (CC'ed) here: [PATCH] stm clas

Re: [PATCH] iscsi-target: return -ENOMEM instead of -1 in case of failed kmalloc()

2015-11-14 Thread Nicholas A. Bellinger
Hi Luis, Apologies for the delayed response. On Mon, 2015-10-19 at 21:18 +0100, Luis de Bethencourt wrote: > Smatch complains about returning hard coded error codes, silence this > warning. > > drivers/target/iscsi/iscsi_target_parameters.c:211 > iscsi_create_default_params() warn: returning -1

[GIT PULL] target fixes for v4.4-rc3

2015-11-28 Thread Nicholas A. Bellinger
Hi Linus, Here are outstanding target-pending fixes queued for v4.4-rc3 code. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes: - Fix tcm-user backend driver expired cmd time processing (agrover) - Elimination of kr

Re: [PATCH] target: use offset_in_page macro

2015-11-29 Thread Nicholas A. Bellinger
Hi Geliang, On Wed, 2015-11-25 at 21:49 +0800, Geliang Tang wrote: > Use offset_in_page macro instead of (addr & ~PAGE_MASK). > > Signed-off-by: Geliang Tang > --- > drivers/target/target_core_user.c | 2 +- > drivers/target/tcm_fc/tfc_io.c| 8 > 2 files changed, 5 insertions(+), 5

Re: [PATCH-v2 1/2] mpt3sas: Refcount sas_device objects and fix unsafe list usage

2015-09-10 Thread Nicholas A. Bellinger
On Wed, 2015-09-09 at 15:03 -0700, Nicholas A. Bellinger wrote: > On Wed, 2015-09-09 at 19:59 +0530, Chaitra Basappa wrote: > > From: Sreekanth Reddy [mailto:sreekanth.re...@avagotech.com] > > Sent: Tuesday, September 08, 2015 5:26 PM > > To: Nicholas A. Bellinger > > C

Re: [PATCH-v2 1/2] mpt3sas: Refcount sas_device objects and fix unsafe list usage

2015-09-11 Thread Nicholas A. Bellinger
On Fri, 2015-09-11 at 10:50 -0700, James Bottomley wrote: > On Thu, 2015-09-10 at 23:55 -0700, Nicholas A. Bellinger wrote: > > On Wed, 2015-09-09 at 15:03 -0700, Nicholas A. Bellinger wrote: > > > On Wed, 2015-09-09 at 19:59 +0530, Chaitra Basappa wrote: > > &

[GIT PULL] target updates for v4.3-rc1

2015-09-11 Thread Nicholas A. Bellinger
(RESENDING) Hi Linus. Here are the outstanding target-pending updates for v4.3-rc1 code. Please go ahead and PULL from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git for-next There are two small conflicts noted by SFR due to a revert in libata.git code: http://marc.inf

Re: [GIT PULL] target updates for v4.3-rc1

2015-09-11 Thread Nicholas A. Bellinger
On Fri, 2015-09-11 at 14:28 -0700, Linus Torvalds wrote: > On Fri, Sep 11, 2015 at 2:07 PM, Nicholas A. Bellinger > wrote: > > (RESENDING) > > This is not a re-send as far as I'm concerned. I've not seen the > original. The last email I saw from you was from Aug

[GIT PULL] target updates for v4.5-rc1

2016-01-20 Thread Nicholas A. Bellinger
Hello Linus, Here are target-pending updates for v4.5-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 Sagi + Jenny's series for iser target + initiator remote invalidation is being merged via rdma.git, and Doug w

Re: [PATCH] configfs: switch ->default groups to a linked list

2016-02-27 Thread Nicholas A. Bellinger
On Fri, 2016-02-26 at 13:33 +0100, Christoph Hellwig wrote: > Replace the current NULL-terminated array of default groups with a linked > list. This gets rid of lots of nasty code to size and/or dynamically > allocate the array. > > While we're at it also provide a conveniant helper to remove the

Re: [PATCH] target/cxgbit: add INET dependency

2016-02-29 Thread Nicholas A. Bellinger
Hi Arnd, On Mon, 2016-02-29 at 12:14 +0100, Arnd Bergmann wrote: > The newly added cxgbit driver directly calls functions of the > IPv4 network stack, which fails if that is disabled: > > ERROR: "ip_route_output_flow" [drivers/target/iscsi/cxgbit/cxgbit.ko] > undefined! > ERROR: "__ip_dev_find"

Re: linux-next: manual merge of the target-merge tree with the net-next tree

2016-02-29 Thread Nicholas A. Bellinger
On Mon, 2016-02-29 at 17:39 +1100, Stephen Rothwell wrote: > Hi Nicholas, > > Today's linux-next merge of the target-merge tree got a conflict in: > > drivers/net/ethernet/chelsio/cxgb4/t4fw_api.h > > between commit: > > ba9cee6aa67d ("cxgb4/iw_cxgb4: TOS support") > > from the net-next tr

Re: [RFC] situation with csum_and_copy_... API

2014-11-20 Thread Nicholas A. Bellinger
Hi Al & Co, On Thu, 2014-11-20 at 21:47 +, Al Viro wrote: > On Wed, Nov 19, 2014 at 04:53:40PM -0500, David Miller wrote: > > > Pulled, thanks Al. > > Umm... Not in net-next.git#master... Anyway, the next portion is in > vfs.git#iov_iter-net right now; I'll post it on netdev once I get som

[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 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 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 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 01/12] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-21 Thread Nicholas A. Bellinger
On Thu, 2015-05-21 at 19:03 +0200, Christoph Hellwig wrote: > On Tue, May 19, 2015 at 08:22:31AM +0200, Christoph Hellwig wrote: > > On Mon, May 18, 2015 at 11:05:47PM -0700, Nicholas A. Bellinger wrote: > > > > [ 12.830576] kernel BUG at ../drivers/target/tar

[PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here is -v2 series for converting LIO target se_node_acl + se_lun mapping tables from fixed size arrays to dynamic RCU hlist_heads. This turns fast-path I/O into a lock-less RCU reader using existing percpu based se_lun->lun_ref logic, and converts the RCU updat

[PATCH-v2 3/9] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes __core_scsi3_do_alloc_registration() code to drop pr_reg->pr_reg_tg_pt_lun pointer usage in favor of a new pr_reg RPTI + existing target_lun. It also includes changes to REGISTER, REGISTER_AND_MOVE and APTPL feature bit codepaths. Cc: Hannes Reinecke

[PATCH-v2 9/9] target: Only reset specific dynamic entries during lun_group creation

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes core_tpg_add_node_to_devs() to avoid unnecessarly resetting every se_dev_entry in se_node_acl->tpg_lun_hlist when the operation is driven by an explicit configfs se_lun->lun_group creation via core_dev_add_lun() to only update a single se_lun. Otherwis

[PATCH-v2 4/9] target/pr: cleanup core_scsi3_pr_seq_non_holder

2015-05-21 Thread Nicholas A. Bellinger
From: Christoph Hellwig Clean up the mess of registered variables, and pass the isid mismatch flag explicitly instead of overloading the registration type. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_pr.c | 43 -

[PATCH-v2 7/9] target: Convert core_tpg_deregister to use list splice

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts core_tpg_deregister() to perform a list splice for any remaining dynamically generated se_node_acls attached to se_tpg, before calling kfree(nacl) to free memory. Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas B

[PATCH-v2 8/9] target: Drop unused se_lun->lun_acl_list

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 15 --- drivers/target/target_core_tpg.c| 4 include/target/target_core_base.h | 3 --- 3 files changed, 2

[PATCH-v2 6/9] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts se_tpg->acl_node_lock to struct mutex, so that ->acl_node_acl walkers in core_clear_lun_from_tpg() can block when calling core_disable_device_list_for_node(). It also updates core_dev_add_lun() to hold ->acl_node_mutex when calling core_tpg_add_node_t

[PATCH-v2 1/9] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts se_node_acl->device_list[] table for mappedluns to modern RCU hlist_head usage in order to support an arbitrary number of node_acl lun mappings. It converts transport_lookup_*_lun() fast-path code to use RCU read path primitives when looking up se_dev

[PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the core_scsi3_pr_seq_non_holder() check for non reservation holding registrations to use an atomic bitop. It also includes associated set_bit() in __core_scsi3_add_registration() and clear_bit() __core_scsi3_free_registration() for the updater path.

[PATCH-v2 5/9] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist

2015-05-21 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the fixed size se_portal_group->tpg_lun_list[] to use modern RCU with hlist_head in order to support an arbitary number of se_lun ports per target endpoint. It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(), and calling it directly fro

[PATCH 3/4] target: Drop se_lun->lun_active for existing percpu lun_ref

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With se_port_t and t10_alua_tg_pt_gp_member being absored into se_lun, there is no need for an extra atomic_t based reference count for PR ALL_TG_PT=1 and ALUA access state transition. Go ahead and use the existing percpu se_lun->lun_ref instead, and convert the two spec

[PATCH 0/4] target: Eliminate se_port + t10_alua_tg_pt_gp_member

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi folks, Here is a -v1 series with HCH's recent changes to go ahead and drop all se_port + t10_alua_tg_pt_gp_member usage within target-core in favor of direct se_lun pointer dereference. This includes the original patch + minor fixes, along with two other improvements

[PATCH 2/4] target: Drop lun_sep_lock for se_lun->lun_se_dev RCU usage

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger With se_port and t10_alua_tg_pt_gp_member being absored into se_lun, there is no need for an extra lock to protect se_lun->lun_se_dev assignment. Also, convert se_lun->lun_stats to use atomic_long_t within the target_complete_ok_work() completion callback. Reported-by:

[PATCH 1/4] target: Subsume se_port + t10_alua_tg_pt_gp_member into se_lun

2015-05-22 Thread Nicholas A. Bellinger
From: Christoph Hellwig This patch eliminates all se_port + t10_alua_tg_pt_gp_member usage, and converts current users to direct se_lun pointer dereference. This includes the removal of core_export_port(), core_release_port() core_dev_export() and core_dev_unexport(). Along with conversion of s

[PATCH 4/4] target: Drop unnecessary core_tpg_register TFO parameter

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch drops unnecessary target_core_fabric_ops parameter usage for core_tpg_register() during fabric driver TFO->fabric_make_tpg() se_portal_group creation callback execution. Instead, use the existing se_wwn->wwn_tf->tf_ops pointer to ensure fabric driver is really

[RFC 0/2] target: Add TFO->complete_irq queue_work bypass

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi HCH & Co, Here is RFC code for adding target_core_fabric_ops->complete_irq bypass that allows fabrics to invoke response callbacks directly from target_complete_cmd() IRQ context. It breaks up existing target_complete_ok_work() code into three pieces: - transport_

[RFC 2/2] loopback: Enable TFO->complete_irq for fast-path ->scsi_done

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Go ahead and enable TFO->complete_irq for testing with loopback LLD code, and avoid the extra fast-path queue_work() context switch if no se_cmd special case handling requirements exist. Cc: Christoph Hellwig Cc: Hannes Reinecke CC: Sagi Grimberg Signed-off-by: Nichol

[RFC 1/2] target: Add support for fabric IRQ completion

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds support for invoking TFO completion callbacks directly from IRQ context in target_complete_cmd(). Some fabric drivers like loopback and vhost can invoke their response callbacks directly from IRQ context, and this patch allows the extra queue_work() dispa

Re: [PATCH 2/4] target: Drop lun_sep_lock for se_lun->lun_se_dev RCU usage

2015-05-22 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 09:57 +0200, Hannes Reinecke wrote: > On 05/22/2015 09:06 AM, Nicholas A. Bellinger wrote: > > From: Nicholas Bellinger > > > > With se_port and t10_alua_tg_pt_gp_member being absored into se_lun, > > there is no need for an extra lock to

Re: [PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions

2015-05-22 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 01:07 -0700, Christoph Hellwig wrote: > Can you put up a git branch with these? Without that or a known > good baseline it's hard to test, or even to do a deep review. Pushed to target-pending/for-next. -- To unsubscribe from this list: send the line "unsubscribe linux-kern

Re: [PATCH-v2 5/9] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist

2015-05-22 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 10:31 +0200, Christoph Hellwig wrote: > > This patch converts the fixed size se_portal_group->tpg_lun_list[] > > to use modern RCU with hlist_head in order to support an arbitary > > number of se_lun ports per target endpoint. > > > > It includes dropping core_tpg_alloc_lun()

Re: [PATCH-v2 1/9] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-22 Thread Nicholas A. Bellinger
(resending) On Fri, 2015-05-22 at 01:24 -0700, Christoph Hellwig wrote: > > - spin_lock_irqsave(&se_sess->se_node_acl->device_list_lock, flags); > > - se_cmd->se_deve = se_sess->se_node_acl->device_list[unpacked_lun]; > > - if (se_cmd->se_deve->lun_flags & TRANSPORT_LUNFLAGS_INITIATOR_ACCESS

Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-22 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 10:26 +0200, Christoph Hellwig wrote: > On Fri, May 22, 2015 at 06:11:04AM +0000, Nicholas A. Bellinger wrote: > > + clear_bit(1, &orig->pr_reg); > > Can you call it ->flags and give the bit a meaningful name? The bit is signaling if se_dev_en

Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 12:12 +0200, Bart Van Assche wrote: > On 05/22/15 08:11, Nicholas A. Bellinger wrote: > > diff --git a/include/target/target_core_base.h > > b/include/target/target_core_base.h > > index e2c0eaf..def5bc8 100644 > > --- a/include/target/target_co

Re: [PATCH-v2 0/9] target: se_node_acl + se_lun RCU conversions

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 12:15 +0200, Bart Van Assche wrote: > On 05/22/15 08:11, Nicholas A. Bellinger wrote: > > Here is -v2 series for converting LIO target se_node_acl + se_lun > > mapping tables from fixed size arrays to dynamic RCU hlist_heads. > > The full list o

Re: [PATCH-v2 1/9] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 13:31 +0200, Christoph Hellwig wrote: > On Fri, May 22, 2015 at 01:55:30AM -0700, Nicholas A. Bellinger wrote: > > > This update will now be racy, ditto for the read/write_bytes update > > > later. > > > > This should become an atomic_

Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 13:34 +0200, Christoph Hellwig wrote: > On Fri, May 22, 2015 at 02:05:57AM -0700, Nicholas A. Bellinger wrote: > > On Fri, 2015-05-22 at 10:26 +0200, Christoph Hellwig wrote: > > > On Fri, May 22, 2015 at 06:11:04AM +, Nicholas

Re: [PATCH-v2 2/9] target/pr: Use atomic bitop for se_dev_entry->pr_reg reservation check

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 13:52 +0200, Christoph Hellwig wrote: > > > > -/* > > - * this function can be called with struct se_device->dev_reservation_lock > > - * when register_move = 1 > > - */ > > static void __core_scsi3_add_registration( > > struct se_device *dev, > > struct se_node_acl

Re: [PATCH 2/4] target: Drop lun_sep_lock for se_lun->lun_se_dev RCU usage

2015-05-25 Thread Nicholas A. Bellinger
On Fri, 2015-05-22 at 13:56 +0200, Christoph Hellwig wrote: > > @@ -683,7 +679,7 @@ void core_tpg_remove_lun( > > dev->export_count--; > > spin_unlock(&dev->se_port_lock); > > > > - lun->lun_se_dev = NULL; > > + rcu_assign_pointer(lun->lun_se_dev, NULL)

Re: [PATCH-v2 1/9] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-25 Thread Nicholas A. Bellinger
On Mon, 2015-05-25 at 15:14 -0700, Nicholas A. Bellinger wrote: > On Fri, 2015-05-22 at 13:31 +0200, Christoph Hellwig wrote: > > On Fri, May 22, 2015 at 01:55:30AM -0700, Nicholas A. Bellinger wrote: > > > > > + kref_put(&orig->

[PATCH-v3 10/10] target: Drop left-over se_lun->lun_status

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that se_portal_group->tpg_lun_hlist is a RCU protected hlist, go ahead and drop the left-over lun->lun_status usage. Reported-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 6 -- include/target/target_core_base.

[PATCH-v3 09/10] target: Only reset specific dynamic entries during lun_group creation

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes core_tpg_add_node_to_devs() to avoid unnecessarly resetting every se_dev_entry in se_node_acl->tpg_lun_hlist when the operation is driven by an explicit configfs se_lun->lun_group creation via core_dev_add_lun() to only update a single se_lun. Otherwis

[PATCH-v3 04/10] target/pr: cleanup core_scsi3_pr_seq_non_holder

2015-05-25 Thread Nicholas A. Bellinger
From: Christoph Hellwig Clean up the mess of registered variables, and pass the isid mismatch flag explicitly instead of overloading the registration type. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_pr.c | 44 +

[PATCH-v3 05/10] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the fixed size se_portal_group->tpg_lun_list[] to use modern RCU with hlist_head in order to support an arbitary number of se_lun ports per target endpoint. It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(), and calling it directly fro

Re: [PATCH-v3 00/10] target: se_node_acl + se_lun RCU conversions

2015-05-25 Thread Nicholas A. Bellinger
Please ignore this resend.. On Tue, 2015-05-26 at 06:40 +, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Hi all, > > Here is -v3 series for converting LIO target se_node_acl + se_lun > mapping tables from fixed size arrays to dynamic RCU hlist_heads. > &

[PATCH-v3 01/10] target: Convert se_node_acl->device_list[] to RCU hlist

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts se_node_acl->device_list[] table for mappedluns to modern RCU hlist_head usage in order to support an arbitrary number of node_acl lun mappings. It converts transport_lookup_*_lun() fast-path code to use RCU read path primitives when looking up se_dev

[PATCH-v3 09/10] target: Only reset specific dynamic entries during lun_group creation

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes core_tpg_add_node_to_devs() to avoid unnecessarly resetting every se_dev_entry in se_node_acl->tpg_lun_hlist when the operation is driven by an explicit configfs se_lun->lun_group creation via core_dev_add_lun() to only update a single se_lun. Otherwis

[PATCH-v3 04/10] target/pr: cleanup core_scsi3_pr_seq_non_holder

2015-05-25 Thread Nicholas A. Bellinger
From: Christoph Hellwig Clean up the mess of registered variables, and pass the isid mismatch flag explicitly instead of overloading the registration type. Signed-off-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_pr.c | 44 +

[PATCH-v3 02/10] target/pr: Use atomic bitop for se_dev_entry->deve_flags reservation check

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the core_scsi3_pr_seq_non_holder() check for non reservation holding registrations to use an atomic bitop in ->deve_flags to determine if a registration is currently active. It also includes associated a set_bit() in __core_scsi3_add_registration() an

[PATCH-v3 08/10] target: Drop unused se_lun->lun_acl_list

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 15 --- drivers/target/target_core_tpg.c| 4 include/target/target_core_base.h | 3 --- 3 files changed, 2

[PATCH-v3 00/10] target: se_node_acl + se_lun RCU conversions

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here is -v3 series for converting LIO target se_node_acl + se_lun mapping tables from fixed size arrays to dynamic RCU hlist_heads. This turns fast-path I/O into a lock-less RCU reader using existing percpu based se_lun->lun_ref logic, and converts the RCU updat

[PATCH-v3 03/10] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes __core_scsi3_do_alloc_registration() code to drop pr_reg->pr_reg_tg_pt_lun pointer usage in favor of a new pr_reg RPTI + existing target_lun. It also includes changes to REGISTER, REGISTER_AND_MOVE and APTPL feature bit codepaths. Cc: Hannes Reinecke

[PATCH-v3 10/10] target: Drop left-over se_lun->lun_status

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Now that se_portal_group->tpg_lun_hlist is a RCU protected hlist, go ahead and drop the left-over lun->lun_status usage. Reported-by: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_tpg.c | 6 -- include/target/target_core_base.

[PATCH-v3 06/10] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts se_tpg->acl_node_lock to struct mutex, so that ->acl_node_acl walkers in core_clear_lun_from_tpg() can block when calling core_disable_device_list_for_node(). It also updates core_dev_add_lun() to hold ->acl_node_mutex when calling core_tpg_add_node_t

[PATCH-v3 07/10] target: Convert core_tpg_deregister to use list splice

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts core_tpg_deregister() to perform a list splice for any remaining dynamically generated se_node_acls attached to se_tpg, before calling kfree(nacl) to free memory. Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas B

[PATCH-v3 06/10] target: Convert se_tpg->acl_node_lock to ->acl_node_mutex

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts se_tpg->acl_node_lock to struct mutex, so that ->acl_node_acl walkers in core_clear_lun_from_tpg() can block when calling core_disable_device_list_for_node(). It also updates core_dev_add_lun() to hold ->acl_node_mutex when calling core_tpg_add_node_t

[PATCH-v3 00/10] target: se_node_acl + se_lun RCU conversions

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here is -v3 series for converting LIO target se_node_acl + se_lun mapping tables from fixed size arrays to dynamic RCU hlist_heads. This turns fast-path I/O into a lock-less RCU reader using existing percpu based se_lun->lun_ref logic, and converts the RCU updat

[PATCH-v3 03/10] target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch changes __core_scsi3_do_alloc_registration() code to drop pr_reg->pr_reg_tg_pt_lun pointer usage in favor of a new pr_reg RPTI + existing target_lun. It also includes changes to REGISTER, REGISTER_AND_MOVE and APTPL feature bit codepaths. Cc: Hannes Reinecke

[PATCH-v3 08/10] target: Drop unused se_lun->lun_acl_list

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 15 --- drivers/target/target_core_tpg.c| 4 include/target/target_core_base.h | 3 --- 3 files changed, 2

[PATCH-v3 07/10] target: Convert core_tpg_deregister to use list splice

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts core_tpg_deregister() to perform a list splice for any remaining dynamically generated se_node_acls attached to se_tpg, before calling kfree(nacl) to free memory. Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Sagi Grimberg Signed-off-by: Nicholas B

[PATCH-v3 05/10] target: Convert se_portal_group->tpg_lun_list[] to RCU hlist

2015-05-25 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the fixed size se_portal_group->tpg_lun_list[] to use modern RCU with hlist_head in order to support an arbitary number of se_lun ports per target endpoint. It includes dropping core_tpg_alloc_lun() from core_dev_add_lun(), and calling it directly fro

[PATCH-v3 02/10] target/pr: Use atomic bitop for se_dev_entry->deve_flags reservation check

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch converts the core_scsi3_pr_seq_non_holder() check for non reservation holding registrations to use an atomic bitop in ->deve_flags to determine if a registration is currently active. It also includes associated a set_bit() in __core_scsi3_add_registration() an

[PATCH-v2 0/4] target: Eliminate se_port + t10_alua_tg_pt_gp_member

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, Here is v2 series with HCH's recent changes to go ahead and drop all se_port + t10_alua_tg_pt_gp_member usage within target-core in favor of direct se_lun pointer dereference. This includes the original patch + minor fixes, along with two other improvements for

<    2   3   4   5   6   7   8   9   >