mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Monoses <jani@iv.ro>
To: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ide-cs stack_dump
Date: Tue, 5 Aug 2003 09:44:44 +0300	[thread overview]
Message-ID: <20030805094444.19cfc9f0.jani@iv.ro> (raw)
In-Reply-To: <Pine.SOL.4.30.0308050032490.16314-100000@mion.elka.pw.edu.pl>

On Tue, 5 Aug 2003 01:56:01 +0200 (MET DST)
Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl> wrote:

> 
> On Mon, 4 Aug 2003, Jani Monoses wrote:
> 
> I think I know how this happens:
> 
> register_disk()->blkdev_get()->do_open(), then disk->fops->open()
> (idedisk_open() for ide-disk) calls check_disk_change().
> check_disk_change() calls disk->fops->media_changed().
> idedisk_media_changes() returns drive->removable, so instead of
> returning from check_disk_change() block_device is invalidated
> and bdev->bd_invalidated is set to 1.  Later in do_open(),
> bdev->bd_invalidated flag is checked and since it is 1
> rescan_partitions() is triggered.  Thus partitions are checked and
> added twice: in do_open()->rescan_partitions() and in register_disk().
> 
> [ The same applies to ide-floppy driver and probably some other
> drivers. ]
> 
> Ufff... I hope it is a correct description (I don't have hardware to
> reproduce the problem).

You're probably right in the description. One ugly way I solved this for
2.6.0-test1 was setting bd_invalidated to 0 
 
> Easy way is to fix is to add drive->attach flag, set it in
> idedisk_attach() and check+clear in idedisk_media_changed(),
> but I don't like this solution (patch below, Jani, can you test it?).

I can test is by tomorrow, it's another box that has the PCCard slot.

Jani

      reply	other threads:[~2003-08-05  6:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-04 14:48 Jani Monoses
2003-08-04 14:47 ` Russell King
2003-08-04 23:56 ` Bartlomiej Zolnierkiewicz
2003-08-05  6:44   ` Jani Monoses [this message]

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=20030805094444.19cfc9f0.jani@iv.ro \
    --to=jani@iv.ro \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --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

Powered by JetHome