Subject: Re: Patch to fix disc size for cd/dvd
To: None <>
From: Pavel Cahyna <>
List: tech-kern
Date: 12/17/2005 15:31:30
On Sat, Dec 17, 2005 at 03:09:42PM +0100, Reinoud Zandijk wrote:
> Dear folks,
> i've made a patch for src/sys/dev/scsipi/cd.c to improve disc size
> reporting. The current discsize thats reported is the current recorded
> extent and not the complete maximum extent of the disc.
> An empty CD/DVD disc is seen as having an invalid length and given 800 Mb
> size. This makes it possible to write to a CD using `dd'.
> 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?

Pavel Cahyna