Snapshots are never freed on at least 8.1 and 8.2

Kostik Belousov kostikbel at gmail.com
Wed Mar 16 11:12:19 UTC 2011


On Wed, Mar 16, 2011 at 12:00:19PM +0100, Yamagi Burmeister wrote:
> 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.

See my other reply, I think that #ifdef line shall be removed at all.

We do not care much about ufs/ffs split for long time, and if we do,
we should introduce some operation like UFS_SNAPGONE().
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20110316/0b6c8d99/attachment.pgp


More information about the freebsd-fs mailing list