From: Mike Christie <mchristi@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH 14/14] target: Fix handling of removed LUNs
Date: Thu, 21 Jun 2018 20:32:13 +0000 [thread overview]
Message-ID: <5B2C0B4D.1080806@redhat.com> (raw)
In-Reply-To: <20180301222632.31507-15-bart.vanassche@wdc.com>
On 06/21/2018 03:25 PM, Bart Van Assche wrote:
> On Thu, 2018-06-21 at 14:10 -0500, Mike Christie wrote:
>>>
>>> @@ -3156,9 +3167,13 @@ static int translate_sense_reason(struct se_cmd *cmd, sense_reason_t reason)
>>> si = &sense_info_table[(__force int)
>>> TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE];
>>>
>>> + key = si->key;
>>> if (reason = TCM_CHECK_CONDITION_UNIT_ATTENTION) {
>>> - core_scsi3_ua_for_check_condition(cmd, &asc, &ascq);
>>> - WARN_ON_ONCE(asc = 0);
>>> + if (!core_scsi3_ua_for_check_condition(cmd, &key, &asc,
>>> + &ascq)) {
>>> + cmd->scsi_status = SAM_STAT_BUSY;
>>
>> Here is another question I had about this code path.
>>
>> If you hit this case do you need to undo the setting of the
>> SCF_SENT_CHECK_CONDITION bit done in
>> transport_send_check_condition_and_sense or does the check for that bit
>> need to be fixed up.
>>
>> With the code addition above we have this path setting
>> SCF_SENT_CHECK_CONDITION so
>> iscsit_check_task_reassign_expdatasn/iscsit_task_reassign_complete_scsi_cmnd/
>> transport_send_task_abort would see the CC bit set and return.
>
> Hello Mike,
>
> Have you noticed that patch 1/3 that was attached to my previous e-mail
> moves the code that sets the SCF_SENT_CHECK_CONDITION flag inside
I am not seeing that. I saw SCF_EMULATED_TASK_SENSE was moved but not
SCF_SENT_CHECK_CONDITION. The latter is set a little earlier in
transport_send_check_condition_and_sense.
> translate_sense_reason() and past the point where SAM_STAT_BUSY is returned?
>
next prev parent reply other threads:[~2018-06-21 20:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 22:26 [PATCH 14/14] target: Fix handling of removed LUNs Bart Van Assche
2018-06-21 1:32 ` Mike Christie
2018-06-21 17:53 ` Bart Van Assche
2018-06-21 19:10 ` Mike Christie
2018-06-21 20:25 ` Bart Van Assche
2018-06-21 20:32 ` Mike Christie [this message]
2018-06-21 20:38 ` Mike Christie
2018-06-21 20:53 ` Bart Van Assche
2018-06-21 20:58 ` Bart Van Assche
2018-06-22 3:45 ` Mike Christie
2018-06-22 15:38 ` Bart Van Assche
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B2C0B4D.1080806@redhat.com \
--to=mchristi@redhat.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.