Date: Tue, 9 Jan 2001 08:59:39 +0100 From: Jean-Francois Dockes <jean-francois.dockes@wanadoo.fr> To: schilling@fokus.gmd.de Cc: ken@kdm.org, freebsd-scsi@FreeBSD.ORG, mckay@thehub.com.au Subject: Re: Problems reading burned CDs Message-ID: <14938.50411.764264.64943@gargle.gargle.HOWL> In-Reply-To: <200107021341.PAA16435@burner.fokus.gmd.de> References: <200107021341.PAA16435@burner.fokus.gmd.de>
next in thread | previous in thread | raw e-mail | index | archive | help
schilling@fokus.gmd.de writes: > If you have a MMC writer, you could send a read disk info and check the > disk status. In general it does not work :-( So you could say that in > general you cannot distinguish a CD with bad sectors from one written on > TAO. > Both MMC and pre MMC-writers have a (different: 0x52/0xe5) command named something like 'READ TRACK INFO' which returns the track data length, and would allow detecting a TAO disk by comparing the returned value, which comes from the cdr-specific Program Memory Area (PMA), to the TOC data. For a TAO disk, there is usually a difference of 2 (the runout blocks). I think that a more accurate statement would be to say that you cannot detect a TAO disk on a *reader* (except if the firmware in current writers has deteriorated to the point where they don't support READ TRACK INFO, about which I have no idea). > While it is OK for dd to abort, it is not OK when the filesystem does > read-ahead bejond the FS size as noted in the PVD and then believes > that the last blocks (including parts of the last file) are > un-readable. > > >From ken@panzer.kdm.org Mon Jul 2 02:09:50 2001 > >FreeBSD won't read past the specified end of media (as reported by the read > >capacity command), and shouldn't have any trouble reading files on the CD, > >since any file won't encompass the last two blocks on a TAO CD. As Jörg noted, the end of the iso9660 volume should be taken from the PVD, not the READ CAPACITY data (or take the smallest of the 2). This way, you won't ever try to read the runout blocks. Indeed, I think that this is what the FreeBSD iso mount code does (of course). As read requests are usually truncated to the volume size (at least they used to), I don't think that it would be possible to cause an error by reading a logical iso9660 file. Only dd from the physical track will cause an error, but then, CDs are complicated beasts, and you can't expect dd to work on them in the general case. In some important cd formats (xa), the driver has no way to know *what* data to return to a read call, if not specifically instructed what to do. dd would need a few additional options before this works, but I guess that this is the reason why 'readcd' exists :) Regards, Jean-Francois Dockes To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14938.50411.764264.64943>