Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ua sense in recovery session #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hawkxiang
Copy link

When Initiator ping(noop out) failed, linux kernel will call stop_conn and recover session. Tgt will rebuild session info(in it_nexus_create) and add the ua sense(ASC_POWERON_RESET) to pending_ua_sense_list. But, tgt Set ASC_POWERON_RESET ua sense will make scsi command fast failed, after session recovery.

After recovery, first scmd request will get the ASC_POWERON_RESET(ua sense) and response with SAM_STAT_CHECK_CONDITION status. SCSI module will return IO-error to upper layer without retry, because of expecting_cc_ua = 0 in struct scsi_device(in kernel scsi module).

According to linux kernel code scsi_done --> scsi_complete --> scsi_decide_disposition --> scsi_check_sense, if expecting_cc_ua = 0, scmd response with ASC_POWERON_RESET(ua sense) do not NEEDS_RETRY. It make scmd fast failed, although lun(session)has recovered to normal.
image

In addition, tgt has setted ASC_POWERON_RESET ua sense for LOGICAL_UNIT_RESET and CLEAR_TASK_SET device reset operation (in target_mgmt_request funtion).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant