Snapshots are never freed on at least 8.1 and 8.2

Yamagi Burmeister lists at yamagi.org
Wed Mar 16 11:00:26 UTC 2011


On Wed, 16 Mar 2011, Yamagi Burmeister wrote:

> Hello,
> I'm not sure if this is a bug or the expected behavior but it seems quit
> strange. On at least FreeBSD 8.1 and 8.2 UFS2 snapshots are never freed
> while the filesystem is mounted. Therefor you have to remount every 20
> snapshots which is quiet a pain when using "dump -L" or similar things
> via cron.

Okay, I had a deeper look into this and it's some kind of PEBKAC
(problem exists between keyboard and chair). For various reasons there
is no "options FFS" in the kernel of this box but ufs.ko is loaded in
/boot/loader.conf. In sys/modules/zfs/Makefile the CFLAGS are "CFLAGS+=
-DSOFTUPDATES -DUFS_DIRHASH".
But in sys/ufs/ufs/ufs_lookup.c line 1241 and line 1293 the call to
ffs_snapgone() is hidden behind "FFS". Since FFS isn't defined when
ufs.ko is build the call isn't compiled in, the function isn't called
and the snapshot isn't correctly removed from the list.
So the question is, why there's no -DFFS in the CFLAGS for ufs.ko? At
this time snapshots are broken when ufs.ko is used.

-- 
Homepage:     www.yamagi.org
Jabber:       yamagi at yamagi.org
GnuPG/GPG:    0xEFBCCBCB


More information about the freebsd-fs mailing list