From owner-freebsd-current@FreeBSD.ORG Wed Aug 6 22:23:00 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 6241237B401 for ; Wed, 6 Aug 2003 22:23:00 -0700 (PDT) Received: from bluejay.mail.pas.earthlink.net (bluejay.mail.pas.earthlink.net [207.217.120.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id C97B743FB1 for ; Wed, 6 Aug 2003 22:22:59 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-uinj8ir.dialup.mindspring.com ([165.121.162.91] helo=mindspring.com) by bluejay.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19kdEc-0007aY-00; Wed, 06 Aug 2003 22:22:46 -0700 Message-ID: <3F31E1E0.FDE0911F@mindspring.com> Date: Wed, 06 Aug 2003 22:21:36 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Tobias Roth References: <20030806090253.GA23980@speedy.unibe.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4e91f4239b83a3a32bd3f44858fc65b3f93caf27dac41a8fd350badd9bab72f9c350badd9bab72f9c 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 05:23:00 -0000 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 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