Subject: DVD support (revisited)
To: None <netbsd-help@NetBSD.ORG>
From: Trevin Beattie <trevin@xmission.com>
List: netbsd-help
Date: 06/26/2000 21:35:37
At 11:30 PM 5/27/00 +0200, Dr. Rene Hexel wrote:
>  DVD works "out of the box" (SCSI and ATAPI), just like any plain old
>CD-ROM (with just a bit more capacity, though).  DVD-R should work if

Okay, here's the thing: I got myself a DVD-RAM drive, and it came with
software (MS-Windows 9x only, naturally) to format a DVD with the UDF
(Universal Disk Format) filesystem.  Since DVD-RAM is rewritable, the disk
is treated as an ordinary optical disk.

The UDF specification allows both ISO9660 and UDF to coexist on the same
disk, referencing the same file content.  UDF is supposedly going to
replace ISO9660 sometime in the future.  A production DVD-ROM disk I have
has the ISO9660 filesystem, so I can read it in NetBSD just like any
CD-ROM.  However, when I create a disk with the UDF filesystem under
Windows and then try to mount it in NetBSD, the kernel panics (I would
certainly consider this a bug):
panic: lockmgr: locking against myself
#0 lockstatus() at kern/kern_lock.c:154
#1 cpu_reboot() at arch/i386/i386/machdep.c:1350
#2 panic() at kern/subr_prf.c:212
#3 lockmgr() at kern/kern_lock.c:328
#4 ufs_lock() at ufs/ufs/ufs_vnops.c:1585
#5 vn_lock() at sys/vnode_if.h:724
#6 vrele() at kern/vfs_subr.c:948
#7 cd9660_mount() at isofs/cd9660/cd9660_vfsops.c:222
#8 sys_mount() at kern/vfs_syscalls.c:310
#9 syscall() at arch/i386/i386/trap.c:782

I have seen a UDF filesystem driver for Linux in progress, but nothing like
that for any BSD platform.

Okay, on to the second problem.  Since, at the low level, DVD-RAM behaves
just like an optical disk, I attempted to format it with a BSD ffs
partition.  After creating a disklabel, newfs happily wrote away hundreds
of superblocks (which took several minutes).  At the end, however, it
aborted with an I/O error; after that point, I could no longer access the
DVD drive (the busy light was stuck on) until I powered the system down.
This is exactly the same problem I encountered with trying to use a 640MB
optical disk (which I posted last January): like the optical disk, DVD uses
2048 bytes per sector, which ffs chokes on.

I haven't tried using cdrecord yet, but the trouble with that is that it
presumes static data storage (write-once), and one must build the file
system on local storage before transferring it to DVD.  Incremental updates
are not possible.

-----------------------
Trevin Beattie          "Do not meddle in the affairs of wizards,
trevin@xmission.com     for you are crunchy and good with ketchup."
      {:->                                     --unknown