From owner-freebsd-fs@FreeBSD.ORG Wed Mar 16 11:00:26 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1C46106566B; Wed, 16 Mar 2011 11:00:26 +0000 (UTC) (envelope-from lists@yamagi.org) Received: from mail.yamagi.overkill.yamagi.org (unknown [IPv6:2a01:4f8:121:2102:1::7]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7F48FC19; Wed, 16 Mar 2011 11:00:26 +0000 (UTC) Received: from saya.home.yamagi.org (unknown [IPv6:2001:5c0:150f:8700:21b:21ff:fe07:b562]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.yamagi.overkill.yamagi.org (Postfix) with ESMTPSA id 16C3816663D3; Wed, 16 Mar 2011 12:00:24 +0100 (CET) Date: Wed, 16 Mar 2011 12:00:19 +0100 (CET) From: Yamagi Burmeister X-X-Sender: yamagi@saya.home.yamagi.org To: Yamagi Burmeister In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-fs@freebsd.org, mckusick@freebsd.org Subject: Re: Snapshots are never freed on at least 8.1 and 8.2 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2011 11:00:26 -0000 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