UDF Filesystem driver
This is a new project with the goal of writing a Universal Disk Format (UDF) filesystem driver. UDF is used by most CD-R/RW packet-writing programs (like Adaptec/Roxio DirectCD) and commerical DVD-Video and DVD-ROM discs. The spec can be found at the OSTA website. This spec, in turn, references the ECMA-167r3 spec which can be found at the ECMA website. UDF provides the following features:
  • DVD media compatibilty (UDF 1.02)
  • CD media compatibility (UDF 1.5 - 2.01)
  • Virtual Allocation Table (VAT) for CD-R media
  • Sparing Table for CD-RW media.
  • Unicode support.
  • Extended Attributes support.
  • Sparse allocation of file/directory data.
The patches on this website are for FreeBSD-current only. Those interested in FreeBSD-stable should check out this site, maintained by Jeroen Ruigrok.

  • VAT for CD-R accepting volunteers!
  • Writeable support:
    • newfs_udf
    • CD-RW packet writing
    • DVD[+-]RW writing
    • fsck_udf


UDF support was checked into the HEAD branch of the FreeBSD CVS repository on April 14, 2002. From now on, experimental patches may be posted here, but the best way to get updates is to update your FreeBSD tree.


Very minor update to copyrights. Also hook it up to be statically compiled into the kernel.

The filesystem is now NFS export-able. This was the last feature on the list, so..... It's done!

5-current seems to have stabilized a bit, so this patch catches up to the numerous API changes that have been happening in the kernel. I haven't done a lot of testing on it, but it seems ok. This also adds a few more minor VFS ops, bringing the code that much closer to prime-time.

*Update* Another patch. The previous one suffered from me not reading the CD-RW Sparing Table spec correctly. It should work better now (note that spared sectors are actually pretty uncommon). This patch also has some cosmetic cleanups, and it implements the VOP_BMAP() vop.

CD-RW Sparing tables work. This is the last major feature that was holding back this driver from going into the FreeBSD tree. A lot of cleanup is still needed, but it's getting close. Due to major instabilities in 5-current, the lastest patchset was compiled and tested against -current as of March 9. These patches likely will not work on a system updated past March 9, 2002.

Use the zone allocator for Unicode buffers and the unode structs. This speeds up operations like listing directories.

I discovered that my diff script (I use Perforce, btw) was producing somewhat mangled diffs. Also fix yet another logic bug in the spanned directory case.

Large update. Use routines provided by the UDF spec for doing unicode conversions. Handle directories that span across more than one allocation. Better handle disks created with InCD (part of Nero). Except for Sparing Table support, CD-RW disks work pretty well now.

Minor update to fix VOP_ACCESS().

Brought the -current patch set in line with -stable, as far as locking goes. No noticable functional changes.

A number of changes landed. First of all, don't complain if 16-bit characters are used in the filename. If the top byte of the character is unused, compress the character to 8-bits. How the rest of the OS handles 16-bit characters is to be seen =-) Also support another allocation method for data block layout. These two changes allow the driver to read CD-RW's made with Adaptec/Roxio DirectCD. I would appreciate as much testing on this as possible. Also fixed a bug that could cause corruption of the file timestamp.

Reading files is now many orders of magnitude faster. I'm not totally happy with the algorithms used in udf_read() and udf_readatoffset(), but it will do for now. Next step is to become usefull with CD-RW media.

Big update. There is now rudementary support for reading files. On the down side, it's SLOW. It should be much better once the read-ahead logic is implemented.

Update to KSE. No real functional changes, but it will now compile. Work on actually reading file data is in progress.

Minor update. Use mutexes when manipulating the vnode hash queue. More locking and interlock protection is needed, but this is a start.

35% complete. Can mount/unmount a DVD, find the root directory, and stat the filesystem. Basic vnode allocator done. VOP_ACCESS and VOP_GETATTR are done. Timestamps are a little bogus, but should work for now. VOP_READDIR and VOP_LOOKUP are implemented (though far from 'done') and allow the entire directory tree to be navigated (Whoohoo!). I've tested this on various DVD-Video and DVD-ROM disks to satisfaction.

  1. gunzip the diff file into /usr.
  2. Do patch -p < diff-filename.
  3. Go to /sys/modules/udf and do make && make install
  4. Go to /usr/src/sbin/mount_udf and do make && make install
  5. The udf driver will be auto-loaded by mount_udf when invoked. Try mount -t udf /dev/dvddevice /mnt and go play in the filesystem.