From owner-freebsd-current@FreeBSD.ORG Wed Oct 14 11:59:01 2009 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35149106568B for ; Wed, 14 Oct 2009 11:59:01 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 7A84B8FC17 for ; Wed, 14 Oct 2009 11:59:00 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA01491; Wed, 14 Oct 2009 14:58:56 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <4AD5BD00.4050700@icyb.net.ua> Date: Wed, 14 Oct 2009 14:58:56 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.23 (X11/20090825) MIME-Version: 1.0 To: Alexander Best References: In-Reply-To: X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@FreeBSD.org Subject: Re: panic when mounting device >= 2 times X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Oct 2009 11:59:01 -0000 on 14/10/2009 14:21 Alexander Best said the following: > could somebody have a look at this PR please: > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/108968 > > this still exists in -CURRENT. This is because of serious and long-standing brokenness (probably from time of introduction of GEOM) in g_vfs_open/g_vfs_close. The essence: 1. we allow multiple concurrent read-only mounts of a device 2. but even a read-only mount mangles bufobj of device vnode 3. Bug! Trivial fix with POLA violation - prohibit concurrent RO mounts. Non-trivial fix - _somehow_ avoid changing or depending on device vnode bufobj. See this for even more evil example of this problem: http://lists.freebsd.org/pipermail/freebsd-fs/2009-February/005676.html -- Andriy Gapon