Commit 2af7973a authored by Andy Grover's avatar Andy Grover Committed by Nicholas Bellinger

target: Refer to u32 luns as unpacked_lun

It's clearer to refer to pointers to the struct se_lun as "lun" and the
actual number itself as "unpacked_lun".
Signed-off-by: default avatarAndy Grover <agrover@redhat.com>
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent ab6dae82
...@@ -1112,23 +1112,23 @@ int se_dev_set_block_size(struct se_device *dev, u32 block_size) ...@@ -1112,23 +1112,23 @@ int se_dev_set_block_size(struct se_device *dev, u32 block_size)
struct se_lun *core_dev_add_lun( struct se_lun *core_dev_add_lun(
struct se_portal_group *tpg, struct se_portal_group *tpg,
struct se_device *dev, struct se_device *dev,
u32 lun) u32 unpacked_lun)
{ {
struct se_lun *lun_p; struct se_lun *lun;
int rc; int rc;
lun_p = core_tpg_pre_addlun(tpg, lun); lun = core_tpg_pre_addlun(tpg, unpacked_lun);
if (IS_ERR(lun_p)) if (IS_ERR(lun))
return lun_p; return lun;
rc = core_tpg_post_addlun(tpg, lun_p, rc = core_tpg_post_addlun(tpg, lun,
TRANSPORT_LUNFLAGS_READ_WRITE, dev); TRANSPORT_LUNFLAGS_READ_WRITE, dev);
if (rc < 0) if (rc < 0)
return ERR_PTR(rc); return ERR_PTR(rc);
pr_debug("%s_TPG[%u]_LUN[%u] - Activated %s Logical Unit from" pr_debug("%s_TPG[%u]_LUN[%u] - Activated %s Logical Unit from"
" CORE HBA: %u\n", tpg->se_tpg_tfo->get_fabric_name(), " CORE HBA: %u\n", tpg->se_tpg_tfo->get_fabric_name(),
tpg->se_tpg_tfo->tpg_get_tag(tpg), lun_p->unpacked_lun, tpg->se_tpg_tfo->tpg_get_tag(tpg), lun->unpacked_lun,
tpg->se_tpg_tfo->get_fabric_name(), dev->se_hba->hba_id); tpg->se_tpg_tfo->get_fabric_name(), dev->se_hba->hba_id);
/* /*
* Update LUN maps for dynamically added initiators when * Update LUN maps for dynamically added initiators when
...@@ -1149,7 +1149,7 @@ struct se_lun *core_dev_add_lun( ...@@ -1149,7 +1149,7 @@ struct se_lun *core_dev_add_lun(
spin_unlock_irq(&tpg->acl_node_lock); spin_unlock_irq(&tpg->acl_node_lock);
} }
return lun_p; return lun;
} }
/* core_dev_del_lun(): /* core_dev_del_lun():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment