All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Douglas Gilbert <dougg@torque.net>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] scsi_debug lk 2.6.0t6
Date: Wed, 8 Oct 2003 17:35:17 -0700	[thread overview]
Message-ID: <20031009003517.GC16877@beaverton.ibm.com> (raw)
In-Reply-To: <3F829CCF.3020104@torque.net>

Douglas Gilbert [dougg@torque.net] wrote:
> Another annoyance that I was unable to get to the bottom
> of was during "rmmod scsi_debug" **:
>   Synchronizing SCSI cache for disk sda: <4>FAILED
>     status = 0, message = 00, host = 1, driver = 00
> That is a DID_NO_CONNECT error. So the LLD host is
> being shut down before the sd driver gets a chance to
> send through a SYNCHRONIZE CACHE command. If the user
> instigates a rmmod (as distinct from the hardware
> saying the host/device is gone), shouldn't a window
> be left open for such a flushing type command. This
> problem seems to have appeared recently.

It is related to the state added to scsi_remove_host a while ago to
stop IO flow.

To allow a window as you indicate we would need some method to determine
rmmod vs. unexpected disconnect.

1.) One method would be to add a argument to to scsi_remove_host to
allow passing the type of remove from the LLDD.

2.) Another method would be to call a new function to shutdown the
children of the host prior to module removal (also setting a flag to
stop furthur IO). Then if there was any driver specific actions needed
prior to scsi_remove_host the LLDD could have the freedom to do what
every it needed.

The sd_shutdown function is already registered as a shutdown function. The
only reason it is not called twice is the we never alter the
detach_state of the sd struct device. I am unclear what impact the power
changes have on these interfaces.

-andmike
--
Michael Anderson
andmike@us.ibm.com


      parent reply	other threads:[~2003-10-09  0:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-07 11:00 [PATCH] scsi_debug lk 2.6.0t6 Douglas Gilbert
2003-10-08 12:57 ` Douglas Gilbert
2003-10-09  0:35 ` Mike Anderson [this message]

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=20031009003517.GC16877@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=dougg@torque.net \
    --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.