summaryrefslogtreecommitdiffstats
path: root/include/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-03-27 00:51:03 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2015-06-01 03:24:12 -0400
commit79dc9c9e865a7f8c14737453f112ced25deafdef (patch)
tree3b2ed302eecee3319868fc5f29c7ecfea1f8f27e /include/target
parent80bfdfa92481d431b199eff72788588d13a3988f (diff)
target/pr: Change alloc_registration to avoid pr_reg_tg_pt_lun
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 pr_reg->pr_aptpl_target_lun used by APTPL metadata logic. It also includes changes to REGISTER, REGISTER_AND_MOVE and APTPL feature bit codepaths to use rcu_dereference_check() with the expected non-zero se_dev_entry->pr_kref reference held. Reviewed-by: Hannes Reinecke <hare@suse.de> Cc: Christoph Hellwig <hch@lst.de> Cc: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r--include/target/target_core_base.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 508528a5e927..cf3c6addf05a 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -372,13 +372,14 @@ struct t10_pr_registration {
372 bool isid_present_at_reg; 372 bool isid_present_at_reg;
373 u32 pr_res_mapped_lun; 373 u32 pr_res_mapped_lun;
374 u32 pr_aptpl_target_lun; 374 u32 pr_aptpl_target_lun;
375 u16 tg_pt_sep_rtpi;
375 u32 pr_res_generation; 376 u32 pr_res_generation;
376 u64 pr_reg_bin_isid; 377 u64 pr_reg_bin_isid;
377 u64 pr_res_key; 378 u64 pr_res_key;
378 atomic_t pr_res_holders; 379 atomic_t pr_res_holders;
379 struct se_node_acl *pr_reg_nacl; 380 struct se_node_acl *pr_reg_nacl;
381 /* Used by ALL_TG_PT=1 registration with deve->pr_ref taken */
380 struct se_dev_entry *pr_reg_deve; 382 struct se_dev_entry *pr_reg_deve;
381 struct se_lun *pr_reg_tg_pt_lun;
382 struct list_head pr_reg_list; 383 struct list_head pr_reg_list;
383 struct list_head pr_reg_abort_list; 384 struct list_head pr_reg_abort_list;
384 struct list_head pr_reg_aptpl_list; 385 struct list_head pr_reg_aptpl_list;
@@ -498,7 +499,6 @@ struct se_cmd {
498 struct list_head se_delayed_node; 499 struct list_head se_delayed_node;
499 struct list_head se_qf_node; 500 struct list_head se_qf_node;
500 struct se_device *se_dev; 501 struct se_device *se_dev;
501 struct se_dev_entry *se_deve;
502 struct se_lun *se_lun; 502 struct se_lun *se_lun;
503 /* Only used for internal passthrough and legacy TCM fabric modules */ 503 /* Only used for internal passthrough and legacy TCM fabric modules */
504 struct se_session *se_sess; 504 struct se_session *se_sess;