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.
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.