From owner-cvs-src@FreeBSD.ORG  Sat Jul 19 17:32:41 2003
Return-Path: <owner-cvs-src@FreeBSD.ORG>
Delivered-To: cvs-src@freebsd.org
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 61FF237B404
	for <cvs-src@FreeBSD.org>; Sat, 19 Jul 2003 17:32:41 -0700 (PDT)
Received: from rootlabs.com (root.org [67.118.192.226])
	by mx1.FreeBSD.org (Postfix) with SMTP id 12F3543FA3
	for <cvs-src@FreeBSD.org>; Sat, 19 Jul 2003 17:32:40 -0700 (PDT)
	(envelope-from nate@rootlabs.com)
Received: (qmail 31061 invoked by uid 1000); 20 Jul 2003 00:32:41 -0000
Date: Sat, 19 Jul 2003 17:32:41 -0700 (PDT)
From: Nate Lawson <nate@root.org>
To: Ian Dowse <iedowse@FreeBSD.org>
In-Reply-To: <20030720001135.8D2CC37B497@hub.freebsd.org>
Message-ID: <20030719173209.E31036@root.org>
References: <20030720001135.8D2CC37B497@hub.freebsd.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
cc: cvs-src@FreeBSD.org
cc: src-committers@FreeBSD.org
cc: cvs-all@FreeBSD.org
Subject: Re: cvs commit: src/sbin/umount umount.c
X-BeenThere: cvs-src@freebsd.org
X-Mailman-Version: 2.1.1
Precedence: list
List-Id: CVS commit messages for the src tree <cvs-src.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/cvs-src>
List-Post: <mailto:cvs-src@freebsd.org>
List-Help: <mailto:cvs-src-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/cvs-src>,
	<mailto:cvs-src-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sun, 20 Jul 2003 00:32:41 -0000

On Sat, 19 Jul 2003, Ian Dowse wrote:
>   Modified files:
>     sbin/umount          umount.c
>   Log:
>   Take advantage of the use of file system IDs to simplify umount(8)
>   and make it work more reliably in a number of cases that have
>   traditionally been troublesome. The new behaviour is:
>    1) If the filesystem can be determined by the fsid or device,
>       or uniquely identified by the mountpoint, then just go ahead
>       and call unmount(2) using the file system ID.
>    2) Otherwise use fstatfs(2) to resolve the path into a file system
>       ID (checking with stat(2) that it is a filesystem root directory).
>
>   Case 2 can potentially block if an NFS server is down, but it can
>   always be avoided by using an unambiguous specification. It handles
>   all the hard cases such as symlinks and mismatches between the mount
>   list and reality. For example, if a filesystem was mounted as /mnt
>   inside a chroot, it will show up in the mount list as /mnt, but now
>   you can unmount it from outside the chroot with "umount /chroot_path/mnt".
>
>   Revision  Changes    Path
>   1.39      +144 -298  src/sbin/umount/umount.c

Excellent stuff!

-Nate