Browse by

FreeBSD/ZFS – last word in operating/file systems

Paweł Jakub Dawidek <pjd@FreeBSD.org>

The beginning... • ZFS released by SUN under CDDL license • available in Solaris / OpenSolaris only • ongoing Linux port for FUSE framework (userland); started as SoC project • ongoing port for MacOS X (read-only support in Leopard)

Features...
•

ZFS has many very interesting features, which makes it one of the most wanted file systems

Sleepable mutexes no sleeping while holding mutex(9) • Solaris mutexes implemented on top of sx(9) locks (performance improvements by Attilio Rao) • condvar(9) version that operates on any locks, not only mutexes (implemented by John Baldwin)
•

VPTOFH translates vnode to a file handle • VFS_VPTOFH(9) replaced with VOP_VPTOFH(9) to support NFS exporting of GFS vnodes • its just better that way – confirmed by Kirk McKusick
•

lseek(2) SEEK_{DATA,HOLE} SEEK_HOLE – returns the offset of the next hole • SEEK_DATA – returns the offset of the next data • helpful for backup software • not ZFS-specific
•

Integration with jails ZFS nicely integrates with zones on Solaris, so why not to use it with FreeBSD's jails? • pools can only be managed from outside a jail • zfs file systems can be managed from within a jail
•

“a product is only as good as its test suite” runs most of the ZFS code in userland probably more abuse in 20 seconds that you'd see in a lifetime 3438 tests in 184 files # prove -r /usr/src/tools/regression/fstest/tests tests: chflags(2), chmod(2), chown(2), link(2), mkdir(2), mkfifo(2), open(2), rename(2), rmdir(2), symlink(2), truncate(2), unlink(2)