[stgt] Function conversion of Task Management Function Request
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Sat Jul 16 12:46:46 CEST 2011
On Thu, 23 Jun 2011 09:18:14 +0900
nishino syuuzou <nishino.syuuzou at jp.fujitsu.com> wrote:
> I would like to confirm about Function conversion of TMFR.
> I think that the Function is changed to the internal variable
> with the following code but it seems to CLEAR_TAST_SET(*1)
> and CLEAR_ACA(*2) are placed crossly.
>
> ./usr/iscsi/iscsid.c
> static int iscsi_tm_execute(struct iscsi_task *task) {
> :
> switch (req->flags & ISCSI_FLAG_TM_FUNC_MASK) {
> :
> case ISCSI_TM_FUNC_ABORT_TASK:
> fn = ABORT_TASK;
> break;
> case ISCSI_TM_FUNC_ABORT_TASK_SET:
> fn = ABORT_TASK_SET;
> break;
> case ISCSI_TM_FUNC_CLEAR_ACA:
> *1 fn = CLEAR_TASK_SET;
> break;
> case ISCSI_TM_FUNC_CLEAR_TASK_SET:
> *2 fn = CLEAR_ACA;
> break;
>
> After the above determination (in target_mgmt_request function in
> ./usr/target.c),
> the case "ISCSI_TM_FUNC_CLEAR_ACA" is performed about Task aborting and
> the case "ISCSI_TM_FUNC_CLEAR_TASK_SET" is performed with the comment
> "We don't support ACA".
How about the following patch (until we support the features)?
diff --git a/usr/iscsi/iscsid.c b/usr/iscsi/iscsid.c
index 22a21cc..41dfe22 100644
--- a/usr/iscsi/iscsid.c
+++ b/usr/iscsi/iscsid.c
@@ -1413,10 +1413,10 @@ static int iscsi_tm_execute(struct iscsi_task *task)
fn = ABORT_TASK_SET;
break;
case ISCSI_TM_FUNC_CLEAR_ACA:
- fn = CLEAR_TASK_SET;
+ err = ISCSI_TMF_RSP_NOT_SUPPORTED;
break;
case ISCSI_TM_FUNC_CLEAR_TASK_SET:
- fn = CLEAR_ACA;
+ err = ISCSI_TMF_RSP_NOT_SUPPORTED;
break;
case ISCSI_TM_FUNC_LOGICAL_UNIT_RESET:
fn = LOGICAL_UNIT_RESET;
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list