GEOM/ggate or VFS problem?

Ivan Voras ivoras at
Sat Oct 2 03:37:46 PDT 2004

I've made a GEOM compression layer daemon for ggate (compresses data 
before storing to underlying file/media). It's still early version and 
unfinished, and it's available at:

I know it supports building (and using) an UFS[2] filesystem in it, I 
haven't tried others (It registers as a device with 8k sectors; it seems 
it's the maximum UFS can handle, although the compression would be more 
efficient with larger sector sizes). It's really good at making backups 
of /dev/zero :)

Writing to the device "raw" (e.g. dd if=/dev/zero of=/dev/ggate0) seems 
to work fine. When I use it to host UFS2 filesystem, and do (relatively) 
large writes  to it, both ggcomp and the writing process (e.g. dd) get 
stuck in the 'wdrain' state, and the system often cannot be recovered 
except by hard reboot (e.g. everything (console, network) is still 
active and responsive, CPU is not being hogged, but any fs writes get 

I've reproduced exactly the same problem with the stock ggatel utility 
(which is probably the simplest ggate class consumer there can be, and 
ggcomp is based on it), so this might be an important bug.

Steps to reproduce:

# dd if=/dev/zero of=/tmp/thingie bs=1m count=10
# ggatel create -v /tmp/thingie
# newfs /dev/ggate0
# mount /dev/ggate0 /mnt
# dd if=/dev/zero of=/mnt/blah bs=1m count=9

(repeat the last step until lockup; it takes less time with ggcomp)

I can do this on an old kernel from a few months ago, and also a new 
BETA6 kernel.

Any ideas?

More information about the freebsd-current mailing list