From owner-freebsd-current@FreeBSD.ORG Mon May 19 02:46:43 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 702D937B401; Mon, 19 May 2003 02:46:43 -0700 (PDT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 0FBF543F75; Mon, 19 May 2003 02:46:42 -0700 (PDT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 19 May 2003 10:46:41 +0100 (BST) To: David Schultz In-Reply-To: Your message of "Sun, 18 May 2003 22:18:55 PDT." <20030519051855.GB4396@HAL9000.homeunix.com> Date: Mon, 19 May 2003 10:46:40 +0100 From: Ian Dowse Message-ID: <200305191046.aa58279@salmon.maths.tcd.ie> cc: Makoto Matsushita cc: current@FreeBSD.ORG Subject: Re: 5.1-BETA umount problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 May 2003 09:46:43 -0000 In message <20030519051855.GB4396@HAL9000.homeunix.com>, David Schultz writes: >umount -f can be extremely useful on a multiuser system when you >*really* want to unmount a filesystem regardless of who might be >trying to use it. However, it also makes it easy to shoot >yourself in the foot. If it only fails in situations where you >are absolutely guaranteed to shoot yourself in the foot, that's >fine. There's no reason it should allow someone to unmount a >filesystem that contains a mountpoint for another mounted >filesystem. I've had some patches floating around for a while that change unmount() so that filesystems can be unmounted by specifying the filesystem ID instead of a path. This helps a lot in the unmounting of NFS mounts from dead servers, as it avoids any lookups that might hang indefinitely, but it should also make it possible to unmount filesystems that get detached from the filesystem they were mounted over. I was holding off on committing this in the hopes of finding a cleaner way of passing a fsid_t through unmount()'s `const char *dir' argument. Patch is at: http://www.maths.tcd.ie/~iedowse/FreeBSD/umount_by_fsid.diff Ian