From owner-freebsd-fs@FreeBSD.ORG Wed Mar 16 11:12:19 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 DE69A106566B for ; Wed, 16 Mar 2011 11:12:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 403AC8FC16 for ; Wed, 16 Mar 2011 11:12:18 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p2GBCFeW072438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Mar 2011 13:12:15 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p2GBCFhJ061769; Wed, 16 Mar 2011 13:12:15 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p2GBCFWm061768; Wed, 16 Mar 2011 13:12:15 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 16 Mar 2011 13:12:15 +0200 From: Kostik Belousov To: Yamagi Burmeister Message-ID: <20110316111215.GO78089@deviant.kiev.zoral.com.ua> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="2l/qJWwi7aEgZx1i" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua 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:12:19 -0000 --2l/qJWwi7aEgZx1i Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 16, 2011 at 12:00:19PM +0100, Yamagi Burmeister wrote: > On Wed, 16 Mar 2011, Yamagi Burmeister wrote: >=20 > >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. >=20 > 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+=3D > -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(). --2l/qJWwi7aEgZx1i Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk2Amw8ACgkQC3+MBN1Mb4jzpQCg0GBz3zbztmyrOItlwBUJ+1i3 CSkAoI1spiMZ07jGPhISOefzvirc3cG1 =Zgej -----END PGP SIGNATURE----- --2l/qJWwi7aEgZx1i--