From: Andreas Steinmetz <ast@domdv.de>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
<SPATZ1@t-online.de (Frank Schneider)>
Subject: Re: AIC + RAID1 error? (was: Re: aic7xxx errors)
Date: Tue, 11 Sep 2001 01:05:31 +0200 (CEST) [thread overview]
Message-ID: <XFMail.20010911010531.ast@domdv.de> (raw)
In-Reply-To: <200109102242.f8AMgpY21341@aslan.scsiguy.com>
>
> The new driver registers a "reboot notifier" with the system. If MD
> continues to perform I/O after the aic7xxx driver's notification routine
> is called, the result is undefined. The aic7xxx driver has already
> shutdown the hardware. Perhaps I should use a different event to indicate
> it is safe for me to clean up the hardware?
>
Gotcha!
Actually the problem seems to be the raid code and the scsi code do register
reboot notifiers with the same priority (0, see below).
include/linux/notifier.h:
struct notifier_block
{
int (*notifier_call)(struct notifier_block *self, unsigned long, void
*);
struct notifier_block *next;
int priority;
};
drivers/md/md.c:
struct notifier_block md_notifier = {
md_notify_reboot,
NULL,
0
};
drivers/scsi/aic7xxx/aic7xxx_linux.c:
static struct notifier_block ahc_linux_notifier = {
ahc_linux_halt, NULL, 0
};
When registering the notifiers it depends on who's registering first at the
same priority level.
kernel/sys.c:
int notifier_chain_register(struct notifier_block **list, struct notifier_block
*n)
{
write_lock(¬ifier_lock);
while(*list)
{
if(n->priority > (*list)->priority)
break;
list= &((*list)->next);
}
n->next = *list;
*list=n;
write_unlock(¬ifier_lock);
return 0;
}
The notifier chin is then processed sequentially.
kernel/sys.c:
int notifier_call_chain(struct notifier_block **n, unsigned long val, void *v)
{
int ret=NOTIFY_DONE;
struct notifier_block *nb = *n;
while(nb)
{
ret=nb->notifier_call(nb,val,v);
if(ret&NOTIFY_STOP_MASK)
{
return ret;
}
nb=nb->next;
}
return ret;
}
So what's actually required is to set the raid notifier to a higher priority
than the scsi notifier to assert that raid is stopped before scsi.
Unfortunately I can't test this right now as I'm doing work@home and I do need
physical access to the systems (reset button) if it doesn't work out.
Could you please straighten the priority issue out with the raid maintainer?
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH
next prev parent reply other threads:[~2001-09-10 23:06 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-05 6:21 aic7xxx errors Joseph Mathewson
2001-09-05 7:58 ` Olaf Zaplinski
2001-09-05 9:04 ` Frank Schneider
2001-09-05 10:27 ` Antonio Miguel Trindade
2001-09-05 10:44 ` Frank Schneider
2001-09-05 11:21 ` Thorsten Kranzkowski
2001-09-05 13:05 ` Frank Schneider
2001-09-07 20:32 ` AIC + RAID1 error? (was: Re: aic7xxx errors) Olaf Zaplinski
2001-09-07 22:32 ` Justin T. Gibbs
2001-09-07 22:51 ` Frank Schneider
2001-09-07 23:37 ` Justin T. Gibbs
2001-09-10 13:50 ` Olaf Zaplinski
2001-09-10 19:11 ` Frank Schneider
2001-09-10 22:29 ` Andreas Steinmetz
2001-09-10 22:42 ` Justin T. Gibbs
2001-09-10 22:55 ` Frank Schneider
2001-09-10 23:06 ` Justin T. Gibbs
2001-09-10 23:37 ` Andreas Steinmetz
2001-09-10 23:46 ` Justin T. Gibbs
2001-09-11 0:00 ` Andreas Steinmetz
2001-09-11 12:10 ` Frank Schneider
2001-09-11 16:51 ` Justin T. Gibbs
2001-09-10 23:05 ` Andreas Steinmetz [this message]
2001-09-10 22:46 ` Frank Schneider
2001-09-11 15:00 ` Olaf Zaplinski
2001-09-08 20:25 ` Frank Schneider
2001-09-08 22:07 ` Justin T. Gibbs
2001-09-05 20:23 ` aic7xxx errors Justin T. Gibbs
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=XFMail.20010911010531.ast@domdv.de \
--to=ast@domdv.de \
--cc=gibbs@scsiguy.com \
--cc=linux-kernel@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