Lines Matching refs:lun
208 struct se_lun *lun; in core_get_se_deve_from_rtpi() local
213 lun = deve->se_lun; in core_get_se_deve_from_rtpi()
214 if (!lun) { in core_get_se_deve_from_rtpi()
220 if (lun->lun_tpg->tpg_rtpi != rtpi) in core_get_se_deve_from_rtpi()
287 struct se_lun *lun; in target_dev_ua_allocate() local
290 list_for_each_entry(lun, &dev->dev_sep_list, lun_dev_link) { in target_dev_ua_allocate()
292 spin_lock(&lun->lun_deve_lock); in target_dev_ua_allocate()
293 list_for_each_entry(se_deve, &lun->lun_deve_list, lun_link) in target_dev_ua_allocate()
295 spin_unlock(&lun->lun_deve_lock); in target_dev_ua_allocate()
317 struct se_lun *lun, in core_enable_device_list_for_node() argument
349 if (orig_lun != lun) { in core_enable_device_list_for_node()
367 new->se_lun = lun; in core_enable_device_list_for_node()
373 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
375 list_add_tail(&new->lun_link, &lun->lun_deve_list); in core_enable_device_list_for_node()
376 spin_unlock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
386 new->se_lun = lun; in core_enable_device_list_for_node()
391 spin_lock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
392 list_add_tail(&new->lun_link, &lun->lun_deve_list); in core_enable_device_list_for_node()
393 spin_unlock(&lun->lun_deve_lock); in core_enable_device_list_for_node()
400 struct se_lun *lun, in core_disable_device_list_for_node() argument
409 struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); in core_disable_device_list_for_node()
426 spin_lock(&lun->lun_deve_lock); in core_disable_device_list_for_node()
428 spin_unlock(&lun->lun_deve_lock); in core_disable_device_list_for_node()
456 void core_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg) in core_clear_lun_from_tpg() argument
466 if (lun != deve->se_lun) in core_clear_lun_from_tpg()
469 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_clear_lun_from_tpg()
510 struct se_lun *lun) in core_dev_add_lun() argument
514 rc = core_tpg_add_lun(tpg, lun, false, dev); in core_dev_add_lun()
520 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_add_lun()
534 core_tpg_add_node_to_devs(acl, tpg, lun); in core_dev_add_lun()
549 struct se_lun *lun) in core_dev_del_lun() argument
553 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_del_lun()
556 core_tpg_remove_lun(tpg, lun); in core_dev_del_lun()
589 struct se_lun *lun, in core_dev_add_initiator_node_lun_acl() argument
597 struct se_device *dev = rcu_dereference_raw(lun->lun_se_dev); in core_dev_add_initiator_node_lun_acl()
602 if (lun->lun_access_ro) in core_dev_add_initiator_node_lun_acl()
605 lacl->se_lun = lun; in core_dev_add_initiator_node_lun_acl()
607 if (core_enable_device_list_for_node(lun, lacl, lacl->mapped_lun, in core_dev_add_initiator_node_lun_acl()
613 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, lacl->mapped_lun, in core_dev_add_initiator_node_lun_acl()
620 core_scsi3_check_aptpl_registration(dev, tpg, lun, nacl, in core_dev_add_initiator_node_lun_acl()
626 struct se_lun *lun, in core_dev_del_initiator_node_lun_acl() argument
629 struct se_portal_group *tpg = lun->lun_tpg; in core_dev_del_initiator_node_lun_acl()
640 core_disable_device_list_for_node(lun, deve, nacl, tpg); in core_dev_del_initiator_node_lun_acl()
646 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun, in core_dev_del_initiator_node_lun_acl()