All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: hch@lst.de, James.Bottomley@SteelEye.com,
	alan@lxorguk.ukuu.org.uk, albertcc@tw.ibm.com,
	arjan@infradead.org, linux-ide@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH 1/2] SCSI: implement scsi_eh_schedule_cmd()
Date: Tue, 11 Apr 2006 13:41:57 -0400	[thread overview]
Message-ID: <443BEA65.7020800@pobox.com> (raw)
In-Reply-To: <20060402160414.GM13172@htj.dyndns.org>

Tejun Heo wrote:
> This patch implements scsi_eh_schedule_cmd() which provides a way to
> directly invoke SCSI EH from drivers implementing
> ->eh_strategy_handler.  Combined with scsi_eh_flush_done_q(), this
> gives such drivers complete control over when and how to invoke EH and
> handle failed commands.
> 
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> 
> ---
> 
>  drivers/scsi/scsi_error.c |   24 ++++++++++++++++++++++++
>  include/scsi/scsi_eh.h    |    1 +
>  2 files changed, 25 insertions(+), 0 deletions(-)
> 
> caaed524eab41fab88be717d06627bd50cf66ee2
> diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
> index 5f0fdfb..c314095 100644
> --- a/drivers/scsi/scsi_error.c
> +++ b/drivers/scsi/scsi_error.c
> @@ -90,6 +90,30 @@ int scsi_eh_scmd_add(struct scsi_cmnd *s
>  }
>  
>  /**
> + * scsi_eh_schedule_cmd - schedule scsi cmd for error handling.
> + * @scmd:	scmd to run eh on.
> + *
> + * Description:
> + *	This function is used by LLDDs which don't use standard SCSI
> + *	EH to schedule scmd for EH.
> + *
> + * Return value:
> + *	0 on failure.
> + **/
> +int scsi_eh_schedule_cmd(struct scsi_cmnd *scmd)
> +{
> +	struct Scsi_Host *shost = scmd->device->host;
> +
> +	WARN_ON(!shost->hostt->eh_strategy_handler);
> +
> +	if (!scsi_delete_timer(scmd))
> +		return 0;	/* timeout won */
> +
> +	return scsi_eh_scmd_add(scmd, 0);
> +}
> +EXPORT_SYMBOL_GPL(scsi_eh_schedule_cmd);


ACK, though this patch makes me think that there are some non-libata 
pieces of code that could use this function.

Unfortunately for libata, we are stuck waiting on linux-scsi people to 
return and give their opinion.  If nobody complains, I'll apply it, if 
it doesn't appear in scsi-misc-2.6 sometime vaguely soon.

	Jeff



  parent reply	other threads:[~2006-04-11 17:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-01 10:38 [PATCH] SCSI: implement scsi_eh_schedule() Tejun Heo
2006-04-01 20:14 ` Jeff Garzik
2006-04-02  1:15   ` Tejun Heo
2006-04-02 16:04     ` [PATCH 1/2] SCSI: implement scsi_eh_schedule_cmd() Tejun Heo
2006-04-02 16:06       ` [PATCH 2/2] SCSI: implement scsi_eh_schedule_host() Tejun Heo
2006-04-11 17:43         ` Jeff Garzik
2006-04-02 23:49       ` [PATCH 1/2] SCSI: implement scsi_eh_schedule_cmd() Luben Tuikov
2006-04-03  1:24         ` Tejun Heo
2006-04-11 17:41       ` Jeff Garzik [this message]
2006-04-11 21:28         ` Patrick Mansfield
2006-04-12  2:21           ` Tejun Heo
2006-04-12  8:24             ` Luben Tuikov
2006-04-12 16:18               ` Patrick Mansfield
2006-04-13  5:32                 ` Tejun Heo
2006-04-14  8:49                   ` Luben Tuikov
2006-04-14 12:02                     ` Tejun Heo
2006-04-19 18:49                       ` Luben Tuikov
2006-04-20  2:07                         ` Tejun Heo
2006-04-20 13:01                           ` Christoph Hellwig
2006-04-21  2:22                             ` Tejun Heo
2006-04-20 19:23                           ` Luben Tuikov
2006-04-21  2:39                             ` Tejun Heo

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=443BEA65.7020800@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=albertcc@tw.ibm.com \
    --cc=arjan@infradead.org \
    --cc=hch@lst.de \
    --cc=htejun@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@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.