From owner-freebsd-arch@FreeBSD.ORG Thu Jul 3 11:11:35 2003 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 5B8A337B401 for ; Thu, 3 Jul 2003 11:11:35 -0700 (PDT) Received: from mail.tcoip.com.br (erato.tco.net.br [200.220.254.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF76E43FDF for ; Thu, 3 Jul 2003 11:11:32 -0700 (PDT) (envelope-from dcs@tcoip.com.br) Received: from tcoip.com.br ([10.0.2.6]) by mail.tcoip.com.br (8.11.6/8.11.6) with ESMTP id h63IBMM18624; Thu, 3 Jul 2003 15:11:22 -0300 Message-ID: <3F0471C9.5080003@tcoip.com.br> Date: Thu, 03 Jul 2003 15:11:21 -0300 From: "Daniel C. Sobral" User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030702 X-Accept-Language: en-us, en, pt-br, ja MIME-Version: 1.0 To: Ian Dowse References: <200306282254.aa83607@salmon.maths.tcd.ie> In-Reply-To: <200306282254.aa83607@salmon.maths.tcd.ie> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-arch@freebsd.org Subject: Re: Unmounting by filesystem ID 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: Thu, 03 Jul 2003 18:11:35 -0000 Ian Dowse wrote: > The patch below adds a new mount flag MNT_BYFSID that can be used > to unmount a filesystem by specifying its filesystem ID instead of > a path. The umount utility is changed to use this mechanism by > default. This approach has a number of advantages: > > - It avoids any lookup operations that could potentially block > forever, so filesystems such as NFS can be reliably unmounted > even if the server is not responding but looking up the root node > would require an RPC (maybe to an underlying filesystem). > - The filesystem specification is unambiguous, so umount(8) can > be sure that it is unmounting the correct filesystem (more > work in umount(8) may be required here). > - Detached filesystems can be unmounted. If a filesystem becomes > detached from the filesystem hierarchy because the underlying > filesystem got unmounted, it does not require a reboot to unmount > it. > > Since unmounting by a path name is now only required for compatibility, > in that case unmount() now just does a string comparison to find > the correct filesystem. Also, this patch only affects unmounting; > a similar approach could be applied to MNT_UPDATE mount operations. > > I would like to commit this during the next few days. Any comments > or suggestions? Just in the unlikely case no one has said this to your face yet, man, you rule. -- Daniel C. Sobral (8-DCS) Gerencia de Operacoes Divisao de Comunicacao de Dados Coordenacao de Seguranca VIVO Centro Oeste Norte Fones: 55-61-313-7654/Cel: 55-61-9618-0904 E-mail: Daniel.Capo@tco.net.br Daniel.Sobral@tcoip.com.br dcs@tcoip.com.br Outros: dcs@newsguy.com dcs@freebsd.org capo@notorious.bsdconspiracy.net One time the police stopped me for speeding. They said, "Don't you know the speed limit is fifty-five miles an hour?" I said, "Yeah, I know, but I wasn't going to be out that long." -- Steven Wright