mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* removable media support on 2.6.x
@ 2004-06-04 15:11 Jinu M.
  2004-06-05  4:47 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Jinu M. @ 2004-06-04 15:11 UTC (permalink / raw)
  To: linux-kernel; +Cc: kernelnewbies, Surendra I.

Hi All,

We are developing a storage driver (block driver) on 2.6.x kernel. The 
hardware we are using supports media removal on the fly. We are facing
some problem when the media is removed while the disk is mounted. The
system freezes and the module count never goes to zero.

This is what we do when the disk is removed on the fly.

disk_removed(...)
{
	/* invalidate disk */
	if(gDisk->bdev) {
		invalidate_bdev(gDisk->bdev, 1);
		bdput(gDisk->bdev);
	}

	/* indicates that no disk present */
	set_capacity(gDisk->gd, 0);

	/* cleanup gendisk */
	del_gendisk(gDisk->gd);
	put_disk(gDisk->gd);

	/* clean up blkqueue */
	blk_cleanup_queue(gDisk->blkqueue);
}

disk_removed() is called from the workqueue that is initiated from the
tasklet()<=isr() on card removal.

We guess invalidate_bdev() is the culprit ;) but would like to know
from you all if we are doing some mistake. Is there something missing
or something wrong in the way we are trying to provide removable media
support?

Thanks in advance,

-Jinu

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-06-05 21:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-04 15:11 removable media support on 2.6.x Jinu M.
2004-06-05  4:47 ` Andrew Morton
2004-06-05 21:33   ` modprobing ACPI(?) module gives oops (2.6.7-rc2-mm2) Grzegorz Kulewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®