lkml.org 
[lkml]   [2004]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.0, cdrom still showing directories after being erased
On Thu, Feb 05 2004, Thomas Glanzmann wrote:
> > I still think this is to be expected when mucking in undefined teritory.
> > Reload the media, it's not hard... Sure you can get around this with
> > snooping if you really wanted to, but IMO it's wasted effort. Add -eject
> > to cdrecord command line of default config, how you want so solve it is
> > not my problem.
>
> I don't understand why the Linux kernel doesn't simply invalidates the
> buffers when a CDROM media is unmounted. If this would be case no such
> problems would ever occur.

Actually, that would be an acceptable work around to me. The buffers are
invalidated in the block device page cache on last close, should be easy
enough to kill the driver private TOC cache as well.

===== drivers/ide/ide-cd.c 1.68 vs edited =====
--- 1.68/drivers/ide/ide-cd.c Wed Feb 4 06:37:42 2004
+++ edited/drivers/ide/ide-cd.c Thu Feb 5 22:28:50 2004
@@ -2860,6 +2860,10 @@
static
void ide_cdrom_release_real (struct cdrom_device_info *cdi)
{
+ ide_drive_t *drive = cdi->handle;
+
+ if (!cdi->use_count)
+ CDROM_STATE_FLAGS(drive)->toc_valid = 0;
}


--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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