linux/drivers/target
Nicholas Bellinger 29a05deebf target: Convert se_node_acl->device_list[] to RCU hlist
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_entry.  It adds a new hlist_head at
se_node_acl->lun_entry_hlist for this purpose.

For transport_lookup_cmd_lun() code, it works with existing per-cpu
se_lun->lun_ref when associating se_cmd with se_lun + se_device.
Also, go ahead and update core_create_device_list_for_node() +
core_free_device_list_for_node() to use ->lun_entry_hlist.

It also converts se_dev_entry->pr_ref_count access to use modern
struct kref counting, and updates core_disable_device_list_for_node()
to kref_put() and block on se_deve->pr_comp waiting for outstanding PR
special-case PR references to drop, then invoke kfree_rcu() to wait
for the RCU grace period to complete before releasing memory.

So now that se_node_acl->lun_entry_hlist fast path access uses RCU
protected pointers, go ahead and convert remaining non-fast path
RCU updater code using ->lun_entry_lock to struct mutex to allow
callers to block while walking se_node_acl->lun_entry_hlist.

Finally drop the left-over core_clear_initiator_node_from_tpg() that
originally cleared lun_access during se_node_acl shutdown, as post
RCU conversion it now becomes duplicated logic.

Reviewed-by: Hannes Reinecke <hare@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagig@mellanox.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-06-01 00:23:46 -07:00
..
iscsi iscsi-target: fix variable name typo in iscsi_check_acceptor_state() 2015-05-30 22:42:41 -07:00
loopback target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
sbp target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
tcm_fc target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
Kconfig target: Put TCMU under a new config option 2015-04-19 22:41:12 -07:00
Makefile target: Put TCMU under a new config option 2015-04-19 22:41:12 -07:00
target_core_alua.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_alua.h
target_core_configfs.c target: remove struct target_fabric_configfs_template 2015-05-30 22:42:38 -07:00
target_core_device.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_fabric_configfs.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_fabric_lib.c target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
target_core_file.c target: fix DPO and FUA bit checks 2015-05-30 22:41:44 -07:00
target_core_file.h target/file: Remove fd_prot bounce buffer 2015-05-30 22:41:42 -07:00
target_core_hba.c target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
target_core_iblock.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_iblock.h
target_core_internal.h target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_pr.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_pr.h target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-10-04 05:40:19 +00:00
target_core_pscsi.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_pscsi.h target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST 2015-05-30 19:11:02 -07:00
target_core_rd.c target: Merge sbc_verify_dif_read|write 2015-05-30 22:41:41 -07:00
target_core_rd.h
target_core_sbc.c target: handle odd SG mapping for data transfer memory 2015-05-30 22:42:25 -07:00
target_core_spc.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_stat.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_tmr.c target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
target_core_tpg.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_transport.c target: remove ->put_session method 2015-05-30 22:42:40 -07:00
target_core_ua.c target: Convert se_node_acl->device_list[] to RCU hlist 2015-06-01 00:23:46 -07:00
target_core_ua.h target: target_core_ua_h: Add #define of include guard 2014-09-15 14:27:43 -07:00
target_core_user.c target/user: Add support for bidirectional commands 2015-05-30 22:41:47 -07:00
target_core_xcopy.c target: target_core_configfs.h is not needed in fabric drivers 2015-05-30 22:42:39 -07:00
target_core_xcopy.h