Re: [RFC 02/22] target: Convert enable/disable ->device_list to RCU updater

2015-03-28 Thread Sagi Grimberg
On 3/27/2015 11:04 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger This patch converts core_[enable,disable]_device_list_for_node() to RCU updater path code when modifying se_dev_entry pointers. It includes protected rcu_assign_pointer() and invokes synchronize_rcu() to wait for RCU

Re: [RFC 01/22] target: Convert transport_lookup_*_lun to RCU reader

2015-03-28 Thread Sagi Grimberg
On 3/27/2015 11:04 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger This patch converts transport_lookup_*_lun() fast-path code to use RCU read path primitives when looking up se_dev_entry. It adds a new array of pointers in se_node_acl->lun_entry_hlist for this purpose. For transpor

kcalloc/kmalloc_array could BUILD_BUG_ON for too-big constant arguments (was Re: [PATCH] [RESEND] aic7xxx: replace kmalloc/memset by kzalloc)

2015-03-28 Thread Jeff Epler
The following is a sketch of how a macro kcalloc could BUILD_BUG_ON for overflows of two compile-time operands, or call "kcalloc_variable" for nonconstant arguments. Tested on gcc 4.7.2 only, since it's what I had to hand. I didn't do any testing beyond checking that fn2 didn't build, and that fn