From owner-freebsd-arch@FreeBSD.ORG Fri Jul 9 12:07:00 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0509C16A4CF for ; Fri, 9 Jul 2004 12:07:00 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 61DEB43D4C for ; Fri, 9 Jul 2004 12:06:59 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.11/8.12.11) with ESMTP id i69C6vTF021508 for ; Fri, 9 Jul 2004 14:06:57 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 08 Jul 2004 22:12:28 +0200." <6595.1089317548@critter.freebsd.dk> Date: Fri, 09 Jul 2004 14:06:56 +0200 Message-ID: <21507.1089374816@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: arch@freebsd.org Subject: Re: [RFC] kldunload -f argument. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2004 12:07:00 -0000 In message <6595.1089317548@critter.freebsd.dk>, Poul-Henning Kamp writes: > >In an ideal situation, unmount(8) will fail to unload if the >filesystem is in use but the administrator has the option of applying >the -f(orce) option which tells the kernel: "umount at any cost" [3]. > > >We do not have the same flexibility with kldunload(8), and this is >leading to a minor spot of trouble for modules which autoattach to >things, like for instance GEOM classes where it can be very hard if >not impossible to get the module idle from userland so it can be >unloaded. Here is a patch which does this: http://phk.freebsd.dk/patch/kldunload.patch Tests, comments etc welcome! -- 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.