LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Boaz Harrosh <firstname.lastname@example.org>
Cc: "Sven Köhler" <email@example.com>,
"Christoph Hellwig" <firstname.lastname@example.org>,
"Jeff Garzik" <email@example.com>,
"Joerg Dorchain" <firstname.lastname@example.org>,
"Jon Chelton" <email@example.com>,
"Stefan Priebe - allied internet ag"
Subject: Re: [BUGFIX 2/2] gdth: bugfix for the Timer at exit crash
Date: Wed, 13 Feb 2008 11:03:45 -0600 [thread overview]
Message-ID: <firstname.lastname@example.org> (raw)
On Wed, 2008-02-13 at 18:50 +0200, Boaz Harrosh wrote:
> On Wed, Feb 13 2008 at 18:45 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> > On Wed, 2008-02-13 at 18:33 +0200, Boaz Harrosh wrote:
> >> On Wed, Feb 13 2008 at 17:54 +0200, Boaz Harrosh <email@example.com> wrote:
> >>> On Wed, Feb 13 2008 at 17:44 +0200, James Bottomley <James.Bottomley@HansenPartnership.com> wrote:
> >>>> On Tue, 2008-02-12 at 19:40 +0200, Boaz Harrosh wrote:
> >>>>> - gdth_flush(ha);
> >>>>> -
> >>>> This piece doesn't look right. gdth_flush() forces the internal cache
> >>>> to disk backing. If you remove it, you're taking the chance that the
> >>>> machine will be powered off without a writeback which can cause data
> >>>> corruption.
> >>>> James
> >>> Yes.
> >>> I have more problems reported, with exit, and am just sending one more patch that puts
> >>> this back in. Which was tested.
> >>> So I will resend this one plus one new one.
> >>> Boaz
> >> The gdth driver would do a register_reboot_notifier(&gdth_notifier);
> >> to a gdth_halt() function, which would then redo half of what gdth_exit
> >> does, and wrongly so, and crash.
> >> Are we guaranteed in todays kernel that modules .exit function be called
> >> on an halt or reboot? If so then there is no need for duplications and
> >> the gdth_halt() should go.
> > No. The __exit section is actually discardable if you promise never to
> > remove the module.
> I don't understand please explain.
> What does a driver need to do if it needs a consistent shutdown retine?
> module or built in? unload or shutdown?
It needs to register a reboot notifier, which gdth does.
However, the notifier is only called on reboot, so it also needs to
clean up correctly on module exit as well.
The alternative for GDTH would be to process the SCSI SYNCHRONIZE CACHE
command. That's done by a shutdown notifier from sd, so the correct
thing would always get done; however it does mean the driver has to be
in a condition to process the last sync cache command.
For the quick fix, just keep the current infrastructure and put back the
gdth_flush() command where it can be effective.
next prev parent reply other threads:[~2008-02-13 17:05 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-30 19:47 [BUG?] GDTH driver not working after upgrade to 2.6.24 Sven Köhler
2008-01-31 10:08 ` Boaz Harrosh
2008-01-31 11:07 ` Sven Köhler
2008-01-31 12:35 ` Boaz Harrosh
2008-01-31 16:39 ` Jan Engelhardt
2008-01-31 16:52 ` Boaz Harrosh
2008-02-12 17:30 ` [BUGFIXES 0/2] gdth: fix 2.6.24 driver breakage Boaz Harrosh
2008-02-12 17:35 ` [BUGFIX 1/2] gdth: scan for scsi devices Boaz Harrosh
2008-02-12 18:05 ` Christoph Hellwig
2008-02-12 17:40 ` [BUGFIX 2/2] gdth: bugfix for the Timer at exit crash Boaz Harrosh
2008-02-13 7:06 ` Stefan Priebe - allied internet ag
2008-02-13 9:03 ` Boaz Harrosh
2008-02-13 19:38 ` Jan Engelhardt
2008-02-14 15:58 ` Boaz Harrosh
2008-02-13 10:48 ` Boaz Harrosh
2008-02-13 15:44 ` James Bottomley
2008-02-13 15:54 ` Boaz Harrosh
2008-02-13 16:33 ` Boaz Harrosh
2008-02-13 16:35 ` [PATCH ver2] gdth: bugfix for the at-exit problems Boaz Harrosh
2008-02-13 16:45 ` [BUGFIX 2/2] gdth: bugfix for the Timer at exit crash James Bottomley
2008-02-13 16:50 ` Boaz Harrosh
2008-02-13 17:03 ` James Bottomley [this message]
2008-02-13 17:12 ` Boaz Harrosh
2008-02-13 17:36 ` James Bottomley
2008-02-14 10:49 ` Boaz Harrosh
2008-02-14 11:58 ` [PATCH] gdth: bugfix for the at-exit problems Boaz Harrosh
2008-02-14 16:10 ` James Bottomley
2008-02-14 16:18 ` Boaz Harrosh
2008-02-13 17:18 ` [BUGFIX 2/2] gdth: bugfix for the Timer at exit crash Boaz Harrosh
2008-02-13 17:33 ` James Bottomley
2008-02-14 6:51 ` Christoph Hellwig
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--subject='Re: [BUGFIX 2/2] gdth: bugfix for the Timer at exit crash' \
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).