From owner-freebsd-current@FreeBSD.ORG Thu Aug 7 04:20:38 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 2A74337B401 for ; Thu, 7 Aug 2003 04:20:38 -0700 (PDT) Received: from mailhub02.unibe.ch (mailhub02.unibe.ch [130.92.9.53]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AA8243FA3 for ; Thu, 7 Aug 2003 04:20:37 -0700 (PDT) (envelope-from roth@iam.unibe.ch) Received: from localhost (localhost [127.0.0.1]) by mailhub02.unibe.ch (Postfix) with ESMTP id 8CA8176465; Thu, 7 Aug 2003 13:20:36 +0200 (MEST) Received: from mailhub02.unibe.ch ([127.0.0.1]) by localhost (mailhub02 [127.0.0.1:10024]) (amavisd-new) with LMTP id 04807-01-74; Thu, 7 Aug 2003 13:20:35 +0200 (MEST) Received: from asterix.unibe.ch (asterix.unibe.ch [130.92.64.4]) by mailhub02.unibe.ch (Postfix) with ESMTP id CB5F076459; Thu, 7 Aug 2003 13:20:35 +0200 (MEST) Received: from speedy.unibe.ch (speedy [130.92.64.35]) by asterix.unibe.ch (8.11.6+Sun/8.11.6) with ESMTP id h77BKZK05783; Thu, 7 Aug 2003 13:20:35 +0200 (MET DST) Received: (from roth@localhost) by speedy.unibe.ch (8.11.6+Sun/8.10.2) id h77BKZn01943; Thu, 7 Aug 2003 13:20:35 +0200 (MEST) Date: Thu, 7 Aug 2003 13:20:35 +0200 From: Tobias Roth To: Terry Lambert Message-ID: <20030807112035.GB1348@speedy.unibe.ch> References: <20030806090253.GA23980@speedy.unibe.ch> <3F31E1E0.FDE0911F@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3F31E1E0.FDE0911F@mindspring.com> User-Agent: Mutt/1.4i X-Operating-System: SunOS speedy 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-80 X-Virus-checked: by University of Berne cc: current@freebsd.org Subject: Re: mdconfig feature request 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: Thu, 07 Aug 2003 11:20:38 -0000 On Wed, Aug 06, 2003 at 10:21:36PM -0700, Terry Lambert wrote: > Tobias Roth wrote: > > would it be possible to add the currently attached vnode (or the > > complete path to it) to the output of > > > > mdconfig -l -u > > > > that would simplify some things for me. > > You could do the vnode. Doing the path is hard. the vnode is good enough for me. would someone be so kind to implement that? or will this still cause problems because the vnode file can actually be deleted (as stated below)? > The kernel doesn't really know from paths. > > Basically, the path is not known to the kernel; it's thrown away > as soon as it's translated to a vnode, because it's pretty much > useless wasted space, as far as the kernel is concerned, and the > only reason it deals with them at all is because it has to deal > with humans. > > The actual problem is that while there was *a* path to a file, it > may not be *the* path to the file, and it *may* have included > symbolic links, and it *may* have been one of several hard links > (how do you know which one to return, especially if you are using > exclusion groups or directory permissions to hide information?), > and it *may* be that the file was subsequently deleted, and the > only thing holding it in existance at all is the mdconfig reference > that's outstanding (in which case, the path would best be described > as "you, you fool!"). > > So, unless you are using an FS that doesn't permit hard links, and > doesn't permit deleting open files (e.g. a file share from an SMB > server, like Windows NT 3.5.1 or Windows XP or Windows 2000), you > are pretty much SOL as to reliably getting the path back from just > the vnode reference. > > The best thing to do is to remember what you did, so you can tell > the kernel again later. > > -- Terry