Lines Matching defs:lun

236 	struct se_lun *lun;
248 lun = deve->se_lun;
249 if (!lun) {
255 port = lun->lun_sep;
281 struct se_lun *lun;
300 lun = deve->se_lun;
303 core_update_device_list_for_node(lun, NULL, deve->mapped_lun,
350 struct se_lun *lun,
358 struct se_port *port = lun->lun_sep;
396 if (deve->se_lun != lun) {
406 deve->se_lun = lun;
453 core_scsi3_free_pr_reg_from_nacl(lun->lun_se_dev, nacl);
461 void core_clear_lun_from_tpg(struct se_lun *lun, struct se_portal_group *tpg)
474 if (lun != deve->se_lun)
478 core_update_device_list_for_node(lun, NULL,
547 struct se_lun *lun)
553 spin_lock(&lun->lun_sep_lock);
555 port->sep_lun = lun;
556 lun->lun_sep = port;
557 spin_unlock(&lun->lun_sep_lock);
607 struct se_lun *lun)
615 lun->lun_se_dev = dev;
619 core_export_port(dev, tpg, port, lun);
626 struct se_lun *lun)
628 struct se_port *port = lun->lun_sep;
630 spin_lock(&lun->lun_sep_lock);
631 if (lun->lun_se_dev == NULL) {
632 spin_unlock(&lun->lun_sep_lock);
635 spin_unlock(&lun->lun_sep_lock);
643 lun->lun_se_dev = NULL;
1341 u32 lun)
1353 lun_p = core_tpg_pre_addlun(tpg, lun);
1400 struct se_lun *lun;
1402 lun = core_tpg_pre_dellun(tpg, unpacked_lun);
1403 if (IS_ERR(lun))
1404 return PTR_ERR(lun);
1406 core_tpg_post_dellun(tpg, lun);
1418 struct se_lun *lun;
1430 lun = tpg->tpg_lun_list[unpacked_lun];
1432 if (lun->lun_status != TRANSPORT_LUN_STATUS_FREE) {
1442 return lun;
1451 struct se_lun *lun;
1463 lun = tpg->tpg_lun_list[unpacked_lun];
1465 if (lun->lun_status != TRANSPORT_LUN_STATUS_ACTIVE) {
1475 return lun;
1519 struct se_lun *lun;
1522 lun = core_dev_get_lun(tpg, unpacked_lun);
1523 if (!lun) {
1535 if ((lun->lun_access & TRANSPORT_LUNFLAGS_READ_ONLY) &&
1539 lacl->se_lun = lun;
1541 if (core_update_device_list_for_node(lun, lacl, lacl->mapped_lun,
1545 spin_lock(&lun->lun_acl_lock);
1546 list_add_tail(&lacl->lacl_list, &lun->lun_acl_list);
1547 atomic_inc(&lun->lun_acl_count);
1549 spin_unlock(&lun->lun_acl_lock);
1560 core_scsi3_check_aptpl_registration(lun->lun_se_dev, tpg, lun, lacl);
1570 struct se_lun *lun,
1579 spin_lock(&lun->lun_acl_lock);
1581 atomic_dec(&lun->lun_acl_count);
1583 spin_unlock(&lun->lun_acl_lock);
1585 core_update_device_list_for_node(lun, NULL, lacl->mapped_lun,
1593 tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun,