Re: eh_abort_handler and calling scsi_done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Your assessment sounds correct to me. The other caveat to note is that
if for some reason in your eh_abort_handler you don't think the command
is still outstanding, you should return SUCCESS for this as well.

-Brian

Christof Schmitt wrote:
> I am investigating what is required from a LLD when SCSI commands time
> out and the SCSI EH calls the eh_abort_handler. The documentation in
> scsi_eh.txt states:
> 
>     <<scsi_eh_abort_cmds>>
> 
> 	This action is taken for each timed out command.
> 	hostt->eh_abort_handler() is invoked for each scmd.  The
> 	handler returns SUCCESS if it has succeeded to make LLDD and
> 	all related hardware forget about the scmd.
> 
> From this and from looking at the code, i would conclude:
> 
> 1) If the LLD returns FAILED from the eh_abort_handler, then the
>    command is still allowed to be active in the LLD and the LLD can
>    call scsi_done any time later (probably latest when the
>    eh_host_reset_handler flushes everything that is still pending).
> 
> 2) While the abort is pending, but before returning SUCCESS from
>    eh_abort_handler, the LLD can still call scsi_done for the SCSI
>    command to be aborted (the SCSI command might be returned with a
>    status "aborted" if the abort succeeds, or "good" if it was
>    completed just before the abort reached the storage system).
> 
> Is this correct? Are there any more limitations a SCSI LLD has to be
> aware of?
> 
> --
> Christof Schmitt
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


-- 
Brian King
Linux on Power Virtualization
IBM Linux Technology Center


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux