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

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

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

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

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

2015-06-01 Thread Nicholas A. Bellinger
From: Christoph Hellwig h...@lst.de 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 h...@lst.de Reviewed-by: Hannes Reinecke h...@suse.de Signed-off-by: Nicholas Bellinger n

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

2015-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@lst.de Reviewed-by: Hannes Reinecke h...@suse.de Signed-off-by: Nicholas Bellinger n...@linux

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

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

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

2015-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi all, Here is -v4 series for converting LIO target se_node_acl + se_lun mapping tables from fixed size arrays to dynamic RCU (read-copy-update) hlist_heads. This turns fast-path I/O into a lock-less RCU reader using existing percpu based se_lun

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

2015-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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. Reviewed-by: Hannes Reinecke h...@suse.de Cc: Christoph Hellwig h

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

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

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

2015-06-01 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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. This patch also converts backend drivers to use call_rcu() release to allow any se_device readers

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

2015-06-01 Thread Nicholas A. Bellinger
-off-by: Christoph Hellwig h...@lst.de Reviewed-by: Hannes Reinecke h...@suse.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_alua.c| 394 ++- drivers/target/target_core_alua.h| 14 +- drivers/target

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

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

[GIT PULL] target fixes for v4.1-rc6

2015-05-30 Thread Nicholas A. Bellinger
): target: Fix bidi command handling target: Add missing parentheses Christoph Hellwig (1): target: Fix se_tpg_tfo-tf_subsys regression + remove tf_subsystem Evgenii Lepikhin (1): ISCSI: fix minor memory leak Nicholas Bellinger (1): target: Drop signal_pending checks after interruptible lock

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

2015-05-30 Thread Nicholas A. Bellinger
On Thu, 2015-05-28 at 08:57 -0700, Paul E. McKenney wrote: On Wed, May 27, 2015 at 11:02:10PM -0700, Nicholas A. Bellinger wrote: On Wed, 2015-05-27 at 14:04 -0700, Paul E. McKenney wrote: On Tue, May 26, 2015 at 10:29:45PM -0700, Nicholas A. Bellinger wrote: SNIP In this particular

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

2015-05-28 Thread Nicholas A. Bellinger
On Wed, 2015-05-27 at 14:04 -0700, Paul E. McKenney wrote: On Tue, May 26, 2015 at 10:29:45PM -0700, Nicholas A. Bellinger wrote: On Tue, 2015-05-26 at 16:30 +0200, Bart Van Assche wrote: On 05/26/15 08:57, Nicholas A. Bellinger wrote: @@ -625,6 +626,7 @@ int

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

2015-05-27 Thread Nicholas A. Bellinger
On Wed, 2015-05-27 at 13:36 -0700, Paul E. McKenney wrote: On Tue, May 26, 2015 at 10:13:02PM -0700, Nicholas A. Bellinger wrote: On Tue, 2015-05-26 at 14:44 +0200, Bart Van Assche wrote: On 05/26/15 08:57, Nicholas A. Bellinger wrote: - Add various rcu_dereference

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

2015-05-26 Thread Nicholas A. Bellinger
On Tue, 2015-05-26 at 14:44 +0200, Bart Van Assche wrote: On 05/26/15 08:57, Nicholas A. Bellinger wrote: - Add various rcu_dereference and lockless_dereference RCU notation Hello Nic, Feedback from an RCU expert (which I'm not) would be appreciated here. But my understanding

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

2015-05-26 Thread Nicholas A. Bellinger
On Tue, 2015-05-26 at 16:30 +0200, Bart Van Assche wrote: On 05/26/15 08:57, Nicholas A. Bellinger wrote: @@ -625,6 +626,7 @@ int core_dev_add_initiator_node_lun_acl( u32 lun_access) { struct se_node_acl *nacl = lacl-se_lun_nacl; + struct se_device *dev

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

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

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

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

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

2015-05-26 Thread Nicholas A. Bellinger
From: Christoph Hellwig h...@lst.de 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 h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@suse.de Cc: Christoph Hellwig h...@lst.de

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

2015-05-26 Thread Nicholas A. Bellinger
Please ignore this resend.. On Tue, 2015-05-26 at 06:40 +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org 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 05/10] target: Convert se_portal_group-tpg_lun_list[] to RCU hlist

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

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Cc: Hannes Reinecke h...@suse.de Cc: Christoph Hellwig h...@lst.de Cc: Sagi Grimberg sa...@mellanox.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_device.c | 15 --- drivers/target

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

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

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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

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

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

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

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

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

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Cc: Hannes Reinecke h...@suse.de Cc: Christoph Hellwig h...@lst.de Cc: Sagi Grimberg sa...@mellanox.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_device.c | 15 --- drivers/target

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@suse.de Cc: Christoph Hellwig h...@lst.de

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

2015-05-26 Thread Nicholas A. Bellinger
From: Christoph Hellwig h...@lst.de 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 h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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

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

[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 n...@linux-iscsi.org 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

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

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

[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 n...@linux-iscsi.org 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

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

2015-05-26 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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. This patch also converts backend drivers to use call_rcu() release to allow any se_device readers

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

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

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

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

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

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

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

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

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

2015-05-26 Thread Nicholas A. Bellinger
-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_alua.c| 392 ++- drivers/target/target_core_alua.h| 14 +- drivers/target/target_core_configfs.c| 11 +- drivers

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 of new sparse warnings introduced

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_long_t increment, yes..? Yes. Converted

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 A. Bellinger wrote: + clear_bit(1, orig

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

2015-05-25 Thread Nicholas A. Bellinger
17 00:00:00 2001 From: Nicholas Bellinger n...@linux-iscsi.org Date: Sat, 23 May 2015 23:35:56 -0700 Subject: [PATCH] target: Convert to backend driver call_rcu release Reported-by: Christoph Hellwig h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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_core_base.h +++ b/include/target

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 *nacl, @@

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: SNIP + kref_put(orig-pr_kref, target_pr_kref_release

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

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

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

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

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

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Cc: Hannes Reinecke h...@suse.de Cc: Christoph Hellwig h...@lst.de Cc: Sagi Grimberg sa...@mellanox.com Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_device.c | 15 --- drivers/target

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

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

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

2015-05-22 Thread Nicholas A. Bellinger
From: Christoph Hellwig h...@lst.de 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 h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target

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 n...@linux-iscsi.org 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

[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 n...@linux-iscsi.org 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

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

2015-05-22 Thread Nicholas A. Bellinger
l_tg_pt_gp reference in set_target_port_groups - nab) Signed-off-by: Christoph Hellwig h...@lst.de Signed-off-by: Nicholas Bellinger n...@linux-iscsi.org --- drivers/target/target_core_alua.c| 392 ++- drivers/target/target_core_alua.h| 14 +- drivers

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

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

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

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

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

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

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

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

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

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@suse.de Cc: Christoph Hellwig h...@lst.de

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

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

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

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

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 +, 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_entry has a PR registration active. I

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

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

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) { -

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

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

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

2015-05-22 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org 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 h...@lst.de Cc: Hannes Reinecke h

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

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

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() from

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/target_core_device.c:337! How did

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

2015-04-24 Thread Nicholas A. Bellinger
: simplify the target template registration API target: fix tcm_mod_builder.py Ilias Tsitsimpis (1): target: Better handling of AllRegistrants reservations Julia Lawall (1): iscsi-target: don't export static symbol Ming Lin (1): tcm_loop: fixup tpgt string to integer conversion Nicholas

Re: [PATCH 1/3] target/file: Fix BUG() when CONFIG_DEBUG_SG=y and DIF protection enabled

2015-04-15 Thread Nicholas A. Bellinger
it by allocating prot_buf by kmalloc instead of vmalloc. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J. Bottomley

Re: [PATCH 3/3] target/file: Fix UNMAP with DIF protection support

2015-04-15 Thread Nicholas A. Bellinger
info for the unmapped region by filling with 0xff pattern. This change also adds helper function fd_do_prot_fill() in order to reduce code duplication with existing fd_format_prot(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi

Re: [PATCH 2/3] target/file: Fix SG table for prot_buf initialization

2015-04-15 Thread Nicholas A. Bellinger
) As prot_buf is allocated by kzalloc() and it's physically contiguous, we only need a single scatterlist entry. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@mellanox.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc

Re: [PATCH -next v3] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-12 Thread Nicholas A. Bellinger
be fixed by chaining protection information scatterlist at creation time. For the architectures which don't support sg chaining (i.e. !CONFIG_ARCH_HAS_SG_CHAIN), fix it by allocating temporary scatterlist if needed. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n

[GIT PULL] target fixes for v4.0

2015-04-10 Thread Nicholas A. Bellinger
Hi Linus, Here are the outstanding target fixes for v4.0 code. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master Just a few small fixes. Two from Andy, the first addresses a v4.0 target specific regression to a user visible configfs

Re: [PATCH v2 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-09 Thread Nicholas A. Bellinger
On Wed, 2015-04-08 at 23:25 +0900, Akinobu Mita wrote: 2015-04-08 14:13 GMT+09:00 Nicholas A. Bellinger n...@linux-iscsi.org: On Sun, 2015-04-05 at 23:59 +0900, Akinobu Mita wrote: The scatterlist for protection information which is passed to sbc_dif_verify_read() or sbc_dif_verify_write

Re: [RFC 00/22] target: se_node_acl LUN list RCU conversion

2015-04-08 Thread Nicholas A. Bellinger
On Mon, 2015-04-06 at 23:17 -0700, Christoph Hellwig wrote: On Thu, Apr 02, 2015 at 01:57:10PM -0700, Nicholas A. Bellinger wrote: mempools are for I/O path that make guaranteed progress. While the callers of core_enable_device_list_for_node are in the control path, and not in a very

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

2015-04-08 Thread Nicholas A. Bellinger
On Tue, 2015-04-07 at 19:27 -0400, Martin K. Petersen wrote: nab == Nicholas A Bellinger n...@daterainc.com writes: nab This specifically is to allow LIO to perform WRITE_STRIP + nab READ_INSERT operations when functioning with non T10-PI enabled nab devices, seperate from any available hw

Re: [PATCH] target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling

2015-04-08 Thread Nicholas A. Bellinger
On Wed, 2015-04-08 at 18:33 +0200, Christoph Hellwig wrote: This fixes the crash that I saw, but the Compare and Write testcast in the scsi testsuite still fails.. I'm not seeing this on my end: root@scsi-mq:/usr/src/libiscsi.git# ./test-tool/iscsi-test-cu --test LINUX.CompareAndWrite

[PATCH] target: Fix COMPARE_AND_WRITE with SG_TO_MEM_NOALLOC handling

2015-04-07 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch fixes a bug for COMPARE_AND_WRITE handling with fabrics using SCF_PASSTHROUGH_SG_TO_MEM_NOALLOC. It adds the missing allocation for cmd-t_bidi_data_sg within transport_generic_new_cmd() that is used by COMPARE_AND_WRITE for the initial

Re: [PATCH v2 1/2] target/rd: reduce code duplication in rd_execute_rw()

2015-04-07 Thread Nicholas A. Bellinger
On Sun, 2015-04-05 at 23:59 +0900, Akinobu Mita wrote: Factor out code duplication in rd_execute_rw() into a helper function rd_do_prot_rw(). This change is required to minimize the forthcoming fix in rd_do_prot_rw(). Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas

Re: [PATCH v2 2/2] target/rd: Don't pass imcomplete scatterlist entries to sbc_dif_verify_*

2015-04-07 Thread Nicholas A. Bellinger
it by allocating temporary scatterlist if it is needed. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: Nicholas Bellinger n...@linux-iscsi.org Cc: Sagi Grimberg sa...@dev.mellanox.co.il Cc: Martin K. Petersen martin.peter...@oracle.com Cc: Christoph Hellwig h...@lst.de Cc: James E.J

Re: [RFC 00/22] target: se_node_acl LUN list RCU conversion

2015-04-02 Thread Nicholas A. Bellinger
On Thu, 2015-04-02 at 01:56 -0700, Christoph Hellwig wrote: On Wed, Apr 01, 2015 at 10:37:27PM -0700, Nicholas A. Bellinger wrote: On Wed, 2015-04-01 at 00:04 -0700, Christoph Hellwig wrote: On Tue, Mar 31, 2015 at 11:51:56PM -0700, Nicholas A. Bellinger wrote: Since last week, enable

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

2015-04-01 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 11:02 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch moves the existing target_complete_ok_work() check for cmd-prot_op into it's own function, so it's easier to add future

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

2015-04-01 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 11:07 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates loopback to add a new fabric_prot_type TPG attribute, used for controlling LLD level protection into LIO when

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

2015-04-01 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 11:11 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch updates iscsi/iser-target to add a new fabric_prot_type TPG attribute for iser-target, used for controlling LLD level

Re: [RFC 00/22] target: se_node_acl LUN list RCU conversion

2015-04-01 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 05:08 -0700, Christoph Hellwig wrote: I went through this in detail, and the odd patch split that splits one change up into muliple patches, but then also mixes up other changes makes it hard to read. Thanks for having a look. Will fix up patch ordering for -v2. So I

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

2015-04-01 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 11:01 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds WRITE_STRIP support in target_check_write_prot() that invokes sbc_dif_verify_write() for checking T10-PI metadata before

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

2015-04-01 Thread Nicholas A. Bellinger
On Wed, 2015-04-01 at 12:04 +0300, Sagi Grimberg wrote: On 4/1/2015 8:49 AM, Nicholas A. Bellinger wrote: On Mon, 2015-03-30 at 10:51 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds a new

Re: [RFC 00/22] target: se_node_acl LUN list RCU conversion

2015-04-01 Thread Nicholas A. Bellinger
On Wed, 2015-04-01 at 00:04 -0700, Christoph Hellwig wrote: On Tue, Mar 31, 2015 at 11:51:56PM -0700, Nicholas A. Bellinger wrote: Since last week, enable/disable device_list code has been converted to use mempool + call_rcu() and performs the RCU pointer swap in se_node_acl-lun_entry_hlist

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

2015-03-31 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 10:57 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch moves the existing target_execute_cmd() check for cmd-prot_op into it's own function, so it's easier to add future support

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

2015-03-31 Thread Nicholas A. Bellinger
On Mon, 2015-03-30 at 10:51 +0300, Sagi Grimberg wrote: On 3/30/2015 6:28 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org This patch adds a new target_core_fabric_ops callback for allowing fabric drivers to expose a TPG attribute for signaling when a T10-PI

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

2015-03-29 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds a new target_core_fabric_ops callback for allowing fabric drivers to expose a TPG attribute for signaling when a T10-PI protected fabric wants to function with an un-protected device without T10-PI. This specifically is to allow LIO

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

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

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

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

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

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

<    1   2   3   4   5   6   7   8   9   10   >