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.
TODO
- VAT for CD-R accepting volunteers!
- Writeable support:
- newfs_udf
- CD-RW packet writing
- DVD[+-]RW writing
- fsck_udf
Download
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.
2002-04-13-udf-current.diff.gz
Status
2002-04-13
Very minor update to copyrights. Also hook it up to be statically compiled
into the kernel.
2002-04-12
The filesystem is now NFS export-able. This was the last feature on the
list, so..... It's done!
2002-04-02
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.
2002-03-24
*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.
2002-03-09
Use the zone allocator for Unicode buffers and the unode structs. This
speeds up operations like listing directories.
2002-03-03
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.
2002-02-24
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.
2002-01-29
Minor update to fix VOP_ACCESS().
2002-01-28
Brought the -current patch set in line with -stable, as far as locking goes.
No noticable functional changes.
2001-12-13
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.
2001-10-31
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.
2001-10-24
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.
2001-10-23
Update to KSE. No real functional changes, but it will now compile. Work on
actually reading file data is in progress.
2001-06-11
Minor update. Use mutexes when manipulating the vnode hash queue. More
locking and interlock protection is needed, but this is a start.
2001-06-07
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.
How-to
- gunzip the diff file into /usr.
- Do
patch -p < diff-filename
.
- Go to /sys/modules/udf and do
make && make install
- Go to /usr/src/sbin/mount_udf and do
make && make install
- 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.