From owner-freebsd-geom@FreeBSD.ORG Thu Jun 17 11:53:38 2004 Return-Path: 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 C791A16A4CE for ; Thu, 17 Jun 2004 11:53:38 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2975B43D2D for ; Thu, 17 Jun 2004 11:53:38 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost.freebsd.dk [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i5HBq81P018116; Thu, 17 Jun 2004 13:52:08 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Lukas Ertl From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 17 Jun 2004 13:33:31 +0200." <20040617132625.A58154@pcle2.cc.univie.ac.at> Date: Thu, 17 Jun 2004 13:52:08 +0200 Message-ID: <18115.1087473128@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: geom@freebsd.org Subject: Re: GEOM: orphaning open devices X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Jun 2004 11:53:38 -0000 In message <20040617132625.A58154@pcle2.cc.univie.ac.at>, Lukas Ertl writes: >Hi GEOM hackers, > >I have the following scenario: a mirrored setup with two disks and a >filesystem on top of it. Now, if I yank one disk while the fs is not >mounted, everything works as expected: disk_destroy is called and the >orphaning events make their way up. > >However, if the fs is mounted and I yank the disk, I don't see an >orphaning event until the fs is unmounted again, so it seems disk_destroy >is blocked or rather g_wither_geom waits until the device is closed, which >makes it rather useless in a production area. That is a lot of ground and very little information. the way this is supposed to happen is that you yank the disk, which should orphan geom_disk::whatever and your mirror class should get an orphan event to act on, and de-access and detach your consumer, and that should let the geom_disk::geom wither away. -- 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.