From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: James.Bottomley@steeleye.com, luben_tuikov@adaptec.com,
albertcc@tw.ibm.com, linux-scsi@vger.kernel.org
Subject: Re: [RFC] SCSI EH document
Date: Mon, 29 Aug 2005 18:14:59 +0900 [thread overview]
Message-ID: <4312D213.9000402@gmail.com> (raw)
In-Reply-To: <430F8AE0.7080806@pobox.com>
Hi, Jeff.
Jeff Garzik wrote:
> Tejun Heo wrote:
>
>> Hello, fellow SCSI/ATA developers.
>>
>> This is the first draft of SCSI EH document. This document tries to
>> describe how SCSI EH works and what choirs should be done to maintain
>> SCSI midlayer integrity. It's intended that this document can be used
>> as reference for implementing either fine-grained EH callbacks or
>> single eh_strategy_handler() callback.
>>
>> I'm pretty sure that I've screwed up in (hopefully) several places,
>> so please correct me. Also, I have several places where I'm not sure
>> or have questions, those are marked with *VERIFY* and *QUESTION*
>> respectively. If you know the answer, please let me know.
>
>
> Seems sane to me at first glance.
>
>
>> - EH_RESET_TIMER
>> This indicates that more time is required to finish the
>> command. Timer is restarted. This action is counted as a
>> retry and only allowed scmd->allowed + 1(!) times. Once the
>> limit is reached, EH_NOT_HANDLED action is taken.
>>
>> *NOTE* This action is racy as the LLDD could finish the scmd
>> after the timeout has expired but before it's added back. In
>> such cases, scsi_done() would think that timeout has occurred
>> and return without doing anything. We lose completion and the
>> command will time out again.
>
>
> hmmmm
>
>
>> [2-2-2] Post hostt->eh_strategy_handler() SCSI midlayer conditions
>>
>> The following conditions must be true on exit from the handler.
>>
>> - shost->host_failed is zero.
>>
>> - Each scmd's eh_eflags field is cleared.
>>
>> - Each scmd is in such a state that scsi_setup_cmd_retry() on the
>> scmd doesn't make any difference.
>>
>> - shost->eh_cmd_q is cleared.
>>
>> - Each scmd->eh_entry is cleared. (*VERIFY* This is currently not
>> necessary for correct operation, but keep them cleared anyway for
>> consistency.)
>
>
> Both all the list-heads need to be cleared, otherwise there may be list
> corruption next time the element is added to the list_head.
>
scmd->eh_entry is never used as list head. It's always used as list
entry. So, technically, it needs not be cleared, I think. No? The
problem we had was w/ shost->eh_cmd_q not being cleared.
Thanks.
--
tejun
next prev parent reply other threads:[~2005-08-29 9:15 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-26 3:53 [RFC] SCSI EH document Tejun Heo
2005-08-26 21:34 ` Jeff Garzik
2005-08-29 9:14 ` Tejun Heo [this message]
2005-08-29 13:55 ` Luben Tuikov
2005-08-30 10:47 ` Tejun Heo
2005-08-30 14:50 ` Luben Tuikov
2005-08-29 18:50 ` Jeff Garzik
2005-08-29 19:49 ` Matthew Wilcox
2005-08-29 19:49 ` Jeff Garzik
2005-08-29 21:38 ` Tejun Heo
2005-08-29 22:27 ` Jeff Garzik
2005-08-26 21:36 ` Luben Tuikov
2005-09-07 8:04 ` Jeff Garzik
2005-09-07 11:22 ` Tejun Heo
2005-09-07 13:12 ` Luben Tuikov
2005-09-07 14:00 ` James Bottomley
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=4312D213.9000402@gmail.com \
--to=htejun@gmail.com \
--cc=James.Bottomley@steeleye.com \
--cc=albertcc@tw.ibm.com \
--cc=jgarzik@pobox.com \
--cc=linux-scsi@vger.kernel.org \
--cc=luben_tuikov@adaptec.com \
/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.