On 10/12/24 2:55 AM, 张翔 wrote: > > > For commands coming from sd, then scsi_io_completion will end up calling > scsi_io_completion_action and seeing the UNIT_ATTENTION and will retry. > I'm not saying we shouldn't do a fix like you did below. Just want to > make sure I understand the case you describe above. > > > For commands coming from sd, then scsi_complete calling > scsi_decide_disposition to get "enum scsi_disposition", > scsi_decide_disposition seeing the SAM_STAT_CHECK_CONDITION and calling > scsi_check_sense function, then scsi_check_sense seeing UNIT_ATTENTION. If > expecting_cc_ua == 1, scsi_check_sense return NEEDS_RETRY and scsi_complete > will retry.
For sd, scsi_decide_disposition will return SUCCESS. scsi_complete will call scsi_finish_command. In there we call the upper layer done callback, sd_done, and it will return 0 as there are no good bytes. scsi_io_completion will initially complete 0 bytes. If there are retries left then we call scsi_io_completion_action which sees the UA and will retry. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/open-iscsi/c84560d6-e6e2-4a88-8525-9193854f636d%40oracle.com.
