linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Pfiffer <andyp@osdl.org>
To: Christophe Saout <christophe@saout.de>, adam@yggdrasil.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem?
Date: 11 Jun 2003 17:20:53 -0700	[thread overview]
Message-ID: <1055377253.1222.8.camel@andyp.pdx.osdl.net> (raw)
In-Reply-To: <1055373692.16483.8.camel@chtephan.cs.pocnet.net>

On Wed, 2003-06-11 at 16:21, Christophe Saout wrote:
> Am Don, 2003-06-12 um 00.08 schrieb Andy Pfiffer:
> > On Fri, 2003-05-09 at 13:55, Andy Pfiffer wrote:
> > > On Fri, 2003-05-09 at 13:04, Christophe Saout wrote:
> > > > Am Fre, 2003-05-09 um 21.04 schrieb Andy Pfiffer:
> > > > 
> > > > > [...]
> > > > >  I had an unrelated
> > > > > delay in posting this due to some strange behavior of late with LILO and
> > > > > my ext3-mounted /boot partition (/sbin/lilo would say that it updated,
> > > > > but a subsequent reboot would not include my new kernel)
> > > > 
> > > > So I'm not the only one having this problem... I think I first saw this
> > > > with 2.5.68 but I'm not sure.
<snip>
> > I have taken another look at this, and can confirm the following:
> > 
> > 1. 2.5.67 works as expected.
> > 2. 2.5.68, 2.5.69, and 2.5.70 do not.
> > 3. ext2 vs. ext3 for /boot: no effect (ie, .68, .69, .70 demonstrate the
> > problem independent of the filesystem used for /boot).
> 
> I found out that flushb /dev/<boot_device> helps, syncing doesn't. Not
> 100% sure if that's right, because right now I'm always doing both, but
> I remember having only synced before and that didn't help.

<snip>

A little more digging reveals this thread from May 14, 2003:
http://marc.theaimsgroup.com/?l=linux-kernel&m=105296774516509&w=2

Applying the kludge in Adam's message:

--- linux-2.5.69/fs/block_dev.c.orig	2003-05-14 17:43:40.000000000 -0700
+++ linux-2.5.69/fs/block_dev.c	2003-05-14 17:44:29.000000000 -0700
@@ -635,14 +635,24 @@
 int blkdev_put(struct block_device *bdev, int kind)
 {
 	int ret = 0;
 	struct inode *bd_inode = bdev->bd_inode;
 	struct gendisk *disk = bdev->bd_disk;
 
 	down(&bdev->bd_sem);
+
+	/* AJR start */
+	switch (kind) {
+	case BDEV_FILE:
+	case BDEV_FS:
+		sync_blockdev(bd_inode->i_bdev);
+		break;
+	}
+	/* AJR end */
+
 	lock_kernel();
 	if (!--bdev->bd_openers) {
 		switch (kind) {
 		case BDEV_FILE:
 		case BDEV_FS:
 			sync_blockdev(bd_inode->i_bdev);
 			break;

made things work for me in 2.5.68.
I suspect it will make things work for .70 as well.

So now the important question: is it wrong to not sync_blockdev() until
the count drops to 0?

Andy



  parent reply	other threads:[~2003-06-12  0:08 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09 19:04 [KEXEC][2.5.69] kexec for 2.5.69 available Andy Pfiffer
2003-05-09 20:04 ` ext3/lilo/2.5.6[89] (was: [KEXEC][2.5.69] kexec for 2.5.69 available) Christophe Saout
2003-05-09 20:55   ` Andy Pfiffer
2003-05-09 20:46     ` ext3/lilo/2.5.6[89] (was: [KEXEC][2.5.69] kexec for 2.5.69available) Riley Williams
2003-05-09 22:39       ` Joe Korty
2003-05-09 23:39       ` Andy Pfiffer
2003-06-11 22:08     ` ext[23]/lilo/2.5.{68,69,70} -- IDE Problem? Andy Pfiffer
2003-06-11 23:21       ` Christophe Saout
2003-06-11 23:40         ` Bartlomiej Zolnierkiewicz
2003-06-12  0:20         ` Andy Pfiffer [this message]
2003-06-12  0:29           ` ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem? Andrew Morton
2003-06-12 10:42             ` Christophe Saout
2003-06-12 10:54               ` Andrew Morton
2003-06-12 11:12                 ` Christophe Saout
2003-06-12 11:24                 ` ext[23]/lilo/2.5.{68,69,70} -- strace lilo - freeze Christophe Saout
2003-06-12 12:44                 ` ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem? Herbert Xu
2003-06-12 17:27             ` Andy Pfiffer
2003-06-12 17:53               ` Andrew Morton
2003-06-12 18:03                 ` Andy Pfiffer
2003-06-12 18:10                   ` Andrew Morton
2003-06-12 18:53                     ` Christophe Saout
2003-06-12 18:25                   ` Andy Pfiffer
2003-06-13  8:01                     ` Andrew Morton
2003-06-13  9:57                       ` Herbert Xu
2003-06-13 14:42                       ` Eduardo Pereira Habkost
2003-06-13 17:17                       ` Andy Pfiffer
2003-06-13 22:12                       ` Unai Garro Arrazola
2003-06-13 22:28                         ` Andrew Morton

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=1055377253.1222.8.camel@andyp.pdx.osdl.net \
    --to=andyp@osdl.org \
    --cc=adam@yggdrasil.com \
    --cc=christophe@saout.de \
    --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;
as well as URLs for NNTP newsgroup(s).