From owner-freebsd-scsi Mon Jul 2 22:58:55 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from smtprt16.wanadoo.fr (smtprt16.wanadoo.fr [193.252.19.183]) by hub.freebsd.org (Postfix) with ESMTP id 8C31137B403 for ; Mon, 2 Jul 2001 22:58:52 -0700 (PDT) (envelope-from dockes@real-time.com) Received: from amyris.wanadoo.fr (193.252.19.150) by smtprt16.wanadoo.fr; 3 Jul 2001 07:58:51 +0200 Received: from layon.wanadoo.fr (193.250.242.69) by amyris.wanadoo.fr; 3 Jul 2001 07:58:43 +0200 Received: (from dockes@localhost) by layon.wanadoo.fr (8.11.3/8.11.3) id f097xes01878; Tue, 9 Jan 2001 08:59:40 +0100 From: Jean-Francois Dockes MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <14938.50411.764264.64943@gargle.gargle.HOWL> Date: Tue, 9 Jan 2001 08:59:39 +0100 To: schilling@fokus.gmd.de Cc: ken@kdm.org, freebsd-scsi@FreeBSD.ORG, mckay@thehub.com.au Subject: Re: Problems reading burned CDs In-Reply-To: <200107021341.PAA16435@burner.fokus.gmd.de> References: <200107021341.PAA16435@burner.fokus.gmd.de> X-Mailer: VM 6.89 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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