Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Mar 2011 12:00:19 +0100 (CET)
From:      Yamagi Burmeister <lists@yamagi.org>
To:        Yamagi Burmeister <lists@yamagi.org>
Cc:        freebsd-fs@freebsd.org, mckusick@freebsd.org
Subject:   Re: Snapshots are never freed on at least 8.1 and 8.2
Message-ID:  <alpine.BSF.2.00.1103161145220.6622@saya.home.yamagi.org>
In-Reply-To: <alpine.BSF.2.00.1103160925050.4245@saya.home.yamagi.org>
References:  <alpine.BSF.2.00.1103160925050.4245@saya.home.yamagi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@yamagi.org
GnuPG/GPG:    0xEFBCCBCB



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1103161145220.6622>