From owner-freebsd-geom@FreeBSD.ORG Wed Oct 19 17:53:12 2005 Return-Path: X-Original-To: freebsd-geom@freebsd.org Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E20EA16A41F for ; Wed, 19 Oct 2005 17:53:12 +0000 (GMT) (envelope-from andrew@djw.hu) Received: from web.djw.hu (web.djw.hu [212.92.23.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AF1243D46 for ; Wed, 19 Oct 2005 17:53:12 +0000 (GMT) (envelope-from andrew@djw.hu) Received: from filter_main.jail (filter_main.jail [127.0.1.72]) by web.djw.hu (Postfix) with ESMTP id 84CB4A953 for ; Wed, 19 Oct 2005 19:53:11 +0200 (CEST) Received: by web.djw.hu (Postfix, from userid 1001) id F2BB5A950; Wed, 19 Oct 2005 19:53:10 +0200 (CEST) Date: Wed, 19 Oct 2005 19:53:10 +0200 From: Szalai Andras To: freebsd-geom@freebsd.org Message-ID: <20051019175310.GC76081@web.djw.hu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Subject: geom orphan question X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Oct 2005 17:53:13 -0000 Hi, I have spent few hours trying to understand geom. The I/O path is more or less okay, but I have problems with the orphanization procedure. For example, if you look into g_concat.c there is a g_concat_orphan function that calls g_concat_remove_disk. In this function, gconcat 1) orphans its own provider (g_orphan_provider), 2) reset access counts (g_access), 3) detach consumer from the lower layer provider, 4) destroy the consumer. In order to detach the consumer (step 3) you have to be sure that there are no active requests (bios) between the consumer and provider. My question is how can I guarantee that there are no active bios when I call g_detach? c'ya andrew