提交 e9447a46 编写于 作者: B Bryant G. Ly 提交者: Nicholas Bellinger

ibmvscsis: Use tpgt passed in by user

ibmvscsis always returned 0 for the tpg/tag, since it did not
parse the value passed in by the user.

When functions like ALUA members exports the value, it will
be incorrect because targetcli/rtslib starts the tpg numbering
at 1.
Signed-off-by: NBryant G. Ly <bryantly@linux.vnet.ibm.com>
Signed-off-by: NMike Christie <mchristi@redhat.com>
Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
上级 8fa4011e
...@@ -3914,8 +3914,16 @@ static struct se_portal_group *ibmvscsis_make_tpg(struct se_wwn *wwn, ...@@ -3914,8 +3914,16 @@ static struct se_portal_group *ibmvscsis_make_tpg(struct se_wwn *wwn,
{ {
struct ibmvscsis_tport *tport = struct ibmvscsis_tport *tport =
container_of(wwn, struct ibmvscsis_tport, tport_wwn); container_of(wwn, struct ibmvscsis_tport, tport_wwn);
u16 tpgt;
int rc; int rc;
if (strstr(name, "tpgt_") != name)
return ERR_PTR(-EINVAL);
rc = kstrtou16(name + 5, 0, &tpgt);
if (rc)
return ERR_PTR(rc);
tport->tport_tpgt = tpgt;
tport->releasing = false; tport->releasing = false;
rc = core_tpg_register(&tport->tport_wwn, &tport->se_tpg, rc = core_tpg_register(&tport->tport_wwn, &tport->se_tpg,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册