From: Jeff Garzik <jeff@garzik.org>
To: "Darrick J. Wong" <djwong@us.ibm.com>
Cc: "Krzysztof Błaszkowski" <kb@sysmikro.com.pl>,
linux-scsi@vger.kernel.org, vst@vlnb.net,
"Alexis Bruemmer" <alexisb@us.ibm.com>
Subject: Re: [PATCH] libsas: Don't issue commands to devices that have been hot-removed.
Date: Tue, 04 Dec 2007 17:48:33 -0500 [thread overview]
Message-ID: <4755D941.2060903@garzik.org> (raw)
In-Reply-To: <20071204223516.GA6767@tree.beaverton.ibm.com>
Darrick J. Wong wrote:
> Hrm... does this patch help? You'll get a bunch of ATA/SAS disk errors
> printed to the screen if you yank the disk, but at least libsas won't
> get stuck waiting for the cache-flush commands to time out.
> ---
> sd will get hung up issuing commands to flush write cache if a SAS device
> is unplugged without warning. Change libsas to reject commands to domain
> devices that have already gone away.
>
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
>
> drivers/scsi/libsas/sas_ata.c | 4 ++++
> drivers/scsi/libsas/sas_expander.c | 3 +++
> drivers/scsi/libsas/sas_port.c | 2 ++
> drivers/scsi/libsas/sas_scsi_host.c | 7 +++++++
> include/scsi/libsas.h | 1 +
> 5 files changed, 17 insertions(+), 0 deletions(-)
Seems sane...
> diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c
> index 0829b55..f5e5213 100644
> --- a/drivers/scsi/libsas/sas_ata.c
> +++ b/drivers/scsi/libsas/sas_ata.c
> @@ -161,6 +161,10 @@ static unsigned int sas_ata_qc_issue(struct ata_queued_cmd *qc)
> unsigned int num = 0;
> unsigned int xfer = 0;
>
> + /* If the device fell off, no sense in issuing commands */
> + if (dev->gone)
> + return AC_ERR_SYSTEM;
> +
> task = sas_alloc_task(GFP_ATOMIC);
> if (!task)
> return AC_ERR_SYSTEM;
As an aside, issues like this really really imply a need to move libsas
away from the old libata EH stuff (like brking did with ipr, in patches).
Jeff
next prev parent reply other threads:[~2007-12-04 22:48 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-30 9:22 aic94xx or libsas crash on X7DB3 supermicro with enclosure and sata drives Krzysztof Błaszkowski
2007-11-30 21:33 ` Darrick J. Wong
2007-12-03 15:11 ` Krzysztof Błaszkowski
2007-12-03 16:09 ` Krzysztof Błaszkowski
2007-12-03 19:36 ` Darrick J. Wong
2007-12-03 19:43 ` Jeff Garzik
2007-12-03 21:31 ` Darrick J. Wong
2007-12-03 20:06 ` Krzysztof Błaszkowski
2007-12-04 22:35 ` [PATCH] libsas: Don't issue commands to devices that have been hot-removed Darrick J. Wong
2007-12-04 22:48 ` Jeff Garzik [this message]
2007-12-04 23:17 ` Darrick J. Wong
2007-12-04 23:40 ` Jeff Garzik
2007-12-06 16:55 ` Brian King
2008-02-25 23:39 ` Jeff Garzik
-- strict thread matches above, loose matches on Subject: below --
2010-10-01 20:55 Dan Williams
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=4755D941.2060903@garzik.org \
--to=jeff@garzik.org \
--cc=alexisb@us.ibm.com \
--cc=djwong@us.ibm.com \
--cc=kb@sysmikro.com.pl \
--cc=linux-scsi@vger.kernel.org \
--cc=vst@vlnb.net \
/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.