[<prev] [next>] [day] [month] [year] [list]
Message-ID: <c84560d6-e6e2-4a88-8525-9193854f636d@oracle.com>
Date: Mon, 14 Oct 2024 10:34:56 -0500
From: Mike Christie <michael.christie@...cle.com>
To: 张翔 <hawkxiang.cpp@...il.com>
Cc: lduncan@...e.com, cleech@...hat.com, ames.Bottomley@...senpartnership.com,
martin.petersen@...cle.com, james.smart@...adcom.com,
ram.vegesna@...adcom.com, njavali@...vell.com,
open-iscsi@...glegroups.com, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] scsi: libiscsi: Set expecting_cc_ua flag when stop_conn
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.
Powered by blists - more mailing lists