From owner-freebsd-geom@FreeBSD.ORG Thu Oct 25 06:49:08 2012 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 44779895 for ; Thu, 25 Oct 2012 06:49:08 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 76F3E8FC12 for ; Thu, 25 Oct 2012 06:49:07 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA04581 for ; Thu, 25 Oct 2012 09:49:05 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1TRHFZ-000JYv-Au for freebsd-geom@FreeBSD.org; Thu, 25 Oct 2012 09:49:05 +0300 Message-ID: <5088E0E0.2080307@FreeBSD.org> Date: Thu, 25 Oct 2012 09:49:04 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121013 Thunderbird/16.0.1 MIME-Version: 1.0 To: freebsd-geom@FreeBSD.org Subject: geom access method and g_topology_lock X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=X-VIET-VPS Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Oct 2012 06:49:08 -0000 Is that bad if a geom's access method drops and re-acquires g_topology_lock while doing some internal stuff? Is that allowed at all? The problem is that the following innocent-looking code may become not quite so innocent: g_topology_assert(); g_access(cp, -1, 0, -1); /* a lot might have happened between these two lines */ g_detach(cp); g_destroy_consumer(cp); -- Andriy Gapon