From owner-freebsd-stable@FreeBSD.ORG Sat Nov 13 11:21:18 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A350D1065679; Sat, 13 Nov 2010 11:21:18 +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 3794E8FC28; Sat, 13 Nov 2010 11:21:17 +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 oADBL47a079627 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 13 Nov 2010 13:21:04 +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 oADBL4hj036568; Sat, 13 Nov 2010 13:21:04 +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 oADBL4tO036567; Sat, 13 Nov 2010 13:21:04 +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: Sat, 13 Nov 2010 13:21:04 +0200 From: Kostik Belousov To: Andriy Gapon Message-ID: <20101113112104.GE2392@deviant.kiev.zoral.com.ua> References: <4CDD2F5F.2000902@freebsd.org> <4CDD4EB4.40004@freebsd.org> <4CDDF77B.90708@FreeBSD.org> <4CDE6823.6080907@freebsd.org> <4CDE7133.6010803@FreeBSD.org> <4CDE7203.7090507@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="QrrxbCYKnJeJBlX9" Content-Disposition: inline In-Reply-To: <4CDE7203.7090507@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean 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, freebsd-stable@freebsd.org, Martin Matuska Subject: Re: 8.1-STABLE: problem with unmounting ZFS snapshots X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Nov 2010 11:21:18 -0000 --QrrxbCYKnJeJBlX9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 13, 2010 at 01:09:55PM +0200, Andriy Gapon wrote: > on 13/11/2010 13:06 Martin Matuska said the following: > > No, this is not good for us. Solaris does not allow "mounting" of > > snapshots on any vnode, like we do. Solaris has them only in > > .zfs/snapshots. This allows us to have read-only mounts without even > > mounting the parent zfs. > >=20 > > Before v15 we have been happy with that code and had no issues :-) > >=20 > > I have a very simple testcase where just fixing the VFS_RELE breaks our > > forced unmount. Let's say we use the correct VFS_RELE in zfs_vfsops.c: > > VFS_RELE(vfsp->mnt_vnodecovered->v_vfsp); > >=20 > > Now let's say you have a mounted filesystem (e.g. md) under /mnt: > > /dev/md5 on /mnt (ufs, local) > >=20 > > # mkdir /mnt/test > > # mount -t zfs tank@t2 /mnt/test > > # umount -f /mnt > >=20 > > Now you will hang because the second VFS_HOLD. >=20 > Hang here would be bad, I agree. > But I think that the umount shouldn't succeed either, in this case. Normal unmount indeed shall not succeed in this case, because mount adds a reference to the covered vnode. But forced unmount should be allowed to proceed. After unmount, you can use fsid to unmount the lower mount point. >=20 > > So I stick to my opinion > > that this "extra protection" is more a problem than a solution in our > > case and it should be commented out. >=20 >=20 > --=20 > Andriy Gapon > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" --QrrxbCYKnJeJBlX9 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAkzedJ8ACgkQC3+MBN1Mb4iVbACg9BjzaWe4CKTTgoiDq/g3eJab gxIAoPIu6gsaPqGxSYGORw1XUPtuAgSx =P5Rh -----END PGP SIGNATURE----- --QrrxbCYKnJeJBlX9--