News: Pawel Jakub Dawidek <pjd[at]freebsd.org> has created a reimplementation of gjournal which should be more stable and can work together with UFS to achieve a journaled file system. The implementation described on this page is officially obsolete.

gjournal is a project I made for Google's Summer of Code in 2005. Its purpose is to provide device-level journaling for disk drives (and similar devices), but the ultimate goal was to sort of provide a stop-gap solution instead of filesystem journaling. It turned out that it couldn't be done this way because of the way the UFS filesystem handles references to deleted-but-open files (and probably other thins). Another feature that was added to gjournal was "Copy-on-write logging" - the ability to log the writes to the device and then allow at an arbitrary point to commit or rollback the changes.

The official project page is here. The code is AFAIK stable, but unoptimized and untested in real life/deployment. It can be downloaded here.

If there's continued interest in gjournal, I'd probably continue development by splitting the journal and COW functions into separate and more easily maintainable codebases. One other, very likely possibility for the COW funcionality is to remake it in userland using ggate (more easily done, faster & more maintainable code.