Subject: Re: Patch to fix disc size for cd/dvd
To: None <pavel.cahyna@st.mff.cuni.cz, tech-kern@netbsd.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: tech-kern
Date: 12/17/2005 16:36:37
--a1QUDc0q7S3U7/Jg
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,
Reinoud
--a1QUDc0q7S3U7/Jg
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)
iQEVAwUBQ6QwfoKcNwBDyKpoAQKpzgf/ZsfuSbZ6kPhdCvQ+/I4Dhg1HCnXVvPiK
6N9wpnCJZdwmhjr65xTpKzhDj1oVdG4g5iZuZX1pitffuxiiuEPZQXXel2HwX1ot
tolHFgtj7UCV+YLxbAiHYAeY85adWcdFx7D6mwsB6oQrr7r6xZ9eYt0aGqe4q/9G
a9xx47c6yGgTRePp2rwlUrnjU+jKkzm3coueYvUXjvP8QhsY38juYnz/hL65iesH
J7GfyS/3/qVVKuHf0rJ9luJmCY8xd93gNSeitbCpRGrMSF3oaJAym/jrJF+z6PQs
UmuatgFMjIHY/bnE19MXiQwu0Ny9UYSn0pQlS8wcHhFf95lJsNNCVg==
=/NUk
-----END PGP SIGNATURE-----
--a1QUDc0q7S3U7/Jg--