From owner-freebsd-arch Sat May 4 8:37:59 2002 Delivered-To: freebsd-arch@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id F03F837B405; Sat, 4 May 2002 08:37:31 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 4 May 2002 16:37:30 +0100 (BST) To: Robert Watson Cc: cjclark@alum.mit.edu, arch@freebsd.org Subject: Re: df(1) Broken in jail(8) In-Reply-To: Your message of "Sat, 04 May 2002 03:58:21 EDT." Date: Sat, 04 May 2002 16:37:30 +0100 From: Ian Dowse Message-ID: <200205041637.aa50555@salmon.maths.tcd.ie> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , Robe rt Watson writes: >This is a property of the way VFS works with regards to pathnames. In >VFS, pathnames don't really exist, there are just vnodes. :-) >getmntinfo() and relate calls cache a pathname at mount-time, which is >then regurgitated later when requested. That path isn't just wrong in >jail, it's frequently wrong outside of jail. For example, > > mount /dev/ad0s1e /mnt/this/is/one/path > mv /mnt/this/is /mnt/this/was > df A related issue is that unmounting a filesystem may not be possible if the path has changed, if a filesystem on which it is mounted is dead (e.g NFS), or if the filesystem has been severed from the tree by unmounting an underlying filesystem. I was thinking recently about adding a filesystem root vnode reference to struct mount to address some of these cases. For unmount(2) it may be acceptable to require that the specified path matches the mountlist path, so umount() can just look up the mountlist entry instead of calling namei(). Ian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message