From: Bernd Schubert <bs@q-leap.de>
To: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>
Cc: Eric Moore <Eric.Moore@lsi.com>, Sathya Prakash <Sathya.Prakash@lsi.com>
Subject: [PATCH 4/5] fusion prevent DV deadlock
Date: Fri, 12 Sep 2008 21:02:16 +0200 [thread overview]
Message-ID: <200809122102.17306.bs@q-leap.de> (raw)
In-Reply-To: <200809122057.41565.bs@q-leap.de>
The mpt fusion driver will do a domain revalidation on an ion reset, this
DV might cause a live deadlock. The problem has been entirely analyzed in
this thread, but so far no real solution has been implemented.
This patch simply disables the domain revalidation, if it will run into
the deadlock.
Signed-off-by: Bernd Schubert <bs@q-leap.de>
drivers/message/fusion/mptspi.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
Index: linux-2.6.26/drivers/message/fusion/mptspi.c
===================================================================
--- linux-2.6.26.orig/drivers/message/fusion/mptspi.c
+++ linux-2.6.26/drivers/message/fusion/mptspi.c
@@ -672,12 +672,24 @@ static void mptspi_dv_device(struct _MPT
{
VirtTarget *vtarget = scsi_target(sdev)->hostdata;
MPT_ADAPTER *ioc = hd->ioc;
+ unsigned long nr_requests = sdev->request_queue->nr_requests;
+ struct request_list *rl = &sdev->request_queue->rq;
/* no DV on RAID devices */
if (sdev->channel == 0 &&
mptspi_is_raid(hd, sdev->id))
return;
+ if (rl->count[0] + 1 >= nr_requests
+ || rl->count[1] + 1 >= nr_requests) {
+ /* we must NOT do a DV after an error recovery, when we
+ * don't have left a space in the request list, since
+ * this will cause a live dead lock */
+ starget_printk(KERN_INFO, scsi_target(sdev), MYIOC_s_FMT
+ "Skipping DV, to prevent dead lock!\n", ioc->name);
+ return;
+ }
+
/* If this is a piece of a RAID, then quiesce first */
if (sdev->channel == 1 &&
mptscsih_quiesce_raid(hd, 1, vtarget->channel, vtarget->id) < 0) {
next prev parent reply other threads:[~2008-09-12 19:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-12 18:57 [PATCH 0/5] mpt fusion error handler patches Bernd Schubert
2008-09-12 18:59 ` [PATCH 1/5] scsi abort Bernd Schubert
2008-09-12 19:00 ` [PATCH 2/5] fusion reset handler Bernd Schubert
2008-09-12 19:01 ` [PATCH 3/5] fusion remove the TMHandler Bernd Schubert
2008-09-12 19:02 ` Bernd Schubert [this message]
2008-09-13 12:24 ` [PATCH 4/5] fusion prevent DV deadlock Bernd Schubert
2008-09-12 19:03 ` [PATCH 5/5] fusion disable scsi hard resets Bernd Schubert
2008-09-13 4:32 ` [PATCH 0/5] mpt fusion error handler patches Mr. James W. Laferriere
2008-09-13 12:25 ` Bernd Schubert
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=200809122102.17306.bs@q-leap.de \
--to=bs@q-leap.de \
--cc=Eric.Moore@lsi.com \
--cc=Sathya.Prakash@lsi.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox