Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#180 Abort handler for 3.4.2

open
nobody
None
5
2005-08-17
2005-08-17
Anonymous
No

I am using version 3.4.2 for Iscsi initiator and I
don't have a custom linux environment hence I need to
implement my own abort handler.

Now, assuming that we already have a session, I was
looking at the following way to implement a straight
forward abort handler.

1) After finding the session do the following:
spin_lock(&session->task_lock);
task = find_session_mgmt_task(session,
session->mgmt_itt);
trigger_error_recovery(session, task->lun);
spin_unlock(&session->task_lock);

So trigger_error_recovery will invoke
"process_timedout_tasks"
and send the ABORT TASK to the target for all the
tasks associated
with this LUN.

Is there a simpler way to do this ?
Are there any catch-cases that I should be aware of if
I implement this.

Thanks.

Discussion

  • Logged In: NO

    correction,
    rather than task =
    find_session_mgmt_task(session,session->mgmt->itt)
    it is task = find_task_for_cmnd(session, sc);
    rest is the same.