Lines Matching refs:lun

214 	struct se_lun *lun;  in core_get_se_deve_from_rtpi()  local
219 lun = deve->se_lun; in core_get_se_deve_from_rtpi()
220 if (!lun) { in core_get_se_deve_from_rtpi()
226 if (lun->lun_rtpi != rtpi) in core_get_se_deve_from_rtpi()
293 struct se_lun *lun; in target_dev_ua_allocate() local
296 list_for_each_entry(lun, &dev->dev_sep_list, lun_dev_link) { in target_dev_ua_allocate()
298 spin_lock(&lun->lun_deve_lock); in target_dev_ua_allocate()
299 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) in target_dev_ua_allocate()
301 spin_unlock(&lun->lun_deve_lock); in target_dev_ua_allocate()
323 struct se_lun *lun, in core_enable_device_list_for_node() argument
355 if (orig_lun != lun) { in core_enable_device_list_for_node()
373 new->se_lun = lun; in core_enable_device_list_for_node()
379 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
381 list_add_tail(&new->lun_link, &lun->lun_deve_list); in core_enable_device_list_for_node()
382 spin_unlock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
392 new->se_lun = lun; in core_enable_device_list_for_node()
397 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
398 list_add_tail(&new->lun_link, &lun->lun_deve_list); in core_enable_device_list_for_node()
399 spin_unlock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
406 struct se_lun *lun, in core_disable_device_list_for_node() argument
415 struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); in core_disable_device_list_for_node()
432 spin_lock(&lun->lun_deve_lock); in core_disable_device_list_for_node()
434 spin_unlock(&lun->lun_deve_lock); in core_disable_device_list_for_node()
462 void core_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg) in core_clear_lun_from_tpg() argument
472 if (lun != deve->se_lun) in core_clear_lun_from_tpg()
475 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_clear_lun_from_tpg()
482 int core_alloc_rtpi(struct se_lun *lun, struct se_device *dev) in core_alloc_rtpi() argument
506 lun->lun_rtpi = dev->dev_rpti_counter++; in core_alloc_rtpi()
507 if (!lun->lun_rtpi) in core_alloc_rtpi()
515 if (lun->lun_rtpi == tmp->lun_rtpi) in core_alloc_rtpi()
557 struct se_lun *lun) in core_dev_add_lun() argument
561 rc = core_tpg_add_lun(tpg, lun, false, dev); in core_dev_add_lun()
567 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_add_lun()
581 core_tpg_add_node_to_devs(acl, tpg, lun); in core_dev_add_lun()
596 struct se_lun *lun) in core_dev_del_lun() argument
600 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_del_lun()
603 core_tpg_remove_lun(tpg, lun); in core_dev_del_lun()
636 struct se_lun *lun, in core_dev_add_initiator_node_lun_acl() argument
644 struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); in core_dev_add_initiator_node_lun_acl()
649 if (lun->lun_access_ro) in core_dev_add_initiator_node_lun_acl()
652 lacl->se_lun = lun; in core_dev_add_initiator_node_lun_acl()
654 if (core_enable_device_list_for_node(lun, lacl, lacl->mapped_lun, in core_dev_add_initiator_node_lun_acl()
660 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, lacl->mapped_lun, in core_dev_add_initiator_node_lun_acl()
667 core_scsi3_check_aptpl_registration(dev, tpg, lun, nacl, in core_dev_add_initiator_node_lun_acl()
673 struct se_lun *lun, in core_dev_del_initiator_node_lun_acl() argument
676 struct se_portal_group *tpg = lun->lun_tpg; in core_dev_del_initiator_node_lun_acl()
687 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_dev_del_initiator_node_lun_acl()
693 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_del_initiator_node_lun_acl()