Subject: Re: Patch to fix disc size for cd/dvd
To: None <,>
From: Reinoud Zandijk <>
List: tech-kern
Date: 12/17/2005 16:36:37
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Dear Pavel,

On Sat, Dec 17, 2005 at 03:31:30PM +0100, Pavel Cahyna wrote:
> > However when an extent is recorded the initial recorded length is seen as
> > valid and is thus set as absolute upperbound to read and write actions
> > preventing extention of the disc.         
> You didn't describe what your patch does. I assume that it changes it so
> the driver always reports the absolute upper bound instead of the recorded
> length. Correct?
> The current driver properly returns EOF when the CD is read sequentially
> (with dd). This behavior is desirable as it makes doing images easy. Does
> you patch preserve this behavior, or would dd fall over the end of readable
> data and start spitting out I/O errors?

It changes the behaviour that the driver will allways report the correct 
upperbound of LBA that the disc can take.

We have to distinguish between two types of drives, read-only devices and 
recorders and various disc types:

A CD/DVD-ROM drive will behave exactly the same as now. A closed or pressed 
CD-ROM in a CD-RW/DVD*RW drive will behave exactly the same as now. So your 
`dd' will work exactly the same.

A rewritable disc on a CD-RW/DVD*RW won't change behaviour to on either 
device since its one big session anyway without an open track.

Reading recordable discs with `dd' on both a CD-ROM/DVD-ROM or on a 
CD-RW/DVD*RW doesn't make sense anyway since any link block or end of 
session will bomb out anyway; also with the current situation.

A closed recordable disc without link-blocks and without multiple sessions 
will read fine and won't change either compared current situation.

An *open* recordable disc *without closed sesions* will be the only 
behaving differently. Whenever one session is defined `dd' will bomb out 
anyway as in the old code since some sectors are just not defined. In the 
old code this open disc would read till the end of the recorded part but 
the new code will show the rest of the disc and will issue a read-error to 
`dd' that then aborts the read.

Hope this answers your question,

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.6 (NetBSD)