From owner-freebsd-geom@FreeBSD.ORG Wed Oct 19 18:41:56 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 4F46316A41F for ; Wed, 19 Oct 2005 18:41:56 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5A4F43D62 for ; Wed, 19 Oct 2005 18:41:55 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id 9089ABC50; Wed, 19 Oct 2005 18:14:18 +0000 (UTC) To: Szalai Andras From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 19 Oct 2005 20:12:31 +0200." <20051019181231.GD76081@web.djw.hu> Date: Wed, 19 Oct 2005 20:14:16 +0200 Message-ID: <5755.1129745656@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: freebsd-geom@freebsd.org Subject: Re: 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 18:41:56 -0000 In message <20051019181231.GD76081@web.djw.hu>, Szalai Andras writes: >Hi, > >On Wed, Oct 19, 2005 at 08:03:27PM +0200, Poul-Henning Kamp wrote: >> In message <20051019175310.GC76081@web.djw.hu>, Szalai Andras writes: >[...] > >> There are counters in consumers and providers which can tell >> you that. >> >> The above code seems to play fast and loose with that aspect. > >But it means that I have to do something similar to this? > >while (nstart != end) { wait... } >g_detach(...) That would require a thread you can sleep in. A better way is to catch it in your bio_done, and fire off an event to do the cleanup. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.