[lkml]   [2003]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: ide-cs stack_dump
On Tue, 5 Aug 2003 01:56:01 +0200 (MET DST)
Bartlomiej Zolnierkiewicz <> 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.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.096 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site