From owner-freebsd-current Mon Oct 28 12:42:16 2002 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 D655537B41C for ; Mon, 28 Oct 2002 12:42:11 -0800 (PST) Received: from mail.speakeasy.net (mail14.speakeasy.net [216.254.0.214]) by mx1.FreeBSD.org (Postfix) with ESMTP id D698143E4A for ; Mon, 28 Oct 2002 12:42:09 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 22301 invoked from network); 28 Oct 2002 20:42:16 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail14.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 28 Oct 2002 20:42:16 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.6/8.12.6) with ESMTP id g9SKg7n5088456; Mon, 28 Oct 2002 15:42:08 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20021028152827.X62100-100000@mail.chesapeake.net> Date: Mon, 28 Oct 2002 15:42:07 -0500 (EST) From: John Baldwin To: Jeff Roberson Subject: Re: libgtop port and v_tag changes Cc: Nate Lawson , current@FreeBSD.ORG, Joe Marcus Clarke , Terry Lambert Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 28-Oct-2002 Jeff Roberson wrote: > On Mon, 28 Oct 2002, Terry Lambert wrote: > >> John Baldwin wrote: >> > Yes. This means that you don't need to even look at v_tag to see >> > if it is a UFS vnode or not. What does libgtop want with >> > device and inode numbers anways? Does it actually do anything >> > useful with them or does it just print them somewhere? Is a user >> > going to care if the inode number was obtained from the vnode >> > or if we groveled in the internals of UFS to find it? >> >> The user will, if they try to use "find -inum" to identify the >> file name associated with it, since the vnode number is useless >> for this purpose, and the inode number is not... particularly >> if the information is being obtained from a log file. >> > > Terry is right. It needs to be the same inode number that is reported by > stat and getdirents. It's unfortunate that you can't do a getattr or stat > based on the address of the vnode. I have actually used and relied on this > behavior in the past. Not specifically with gtop though. if ((error = VOP_GETATTR(vp, vap, cred, td)) == 0) { vp->v_cachedfs = vap->va_fsid; vp->v_cachedid = vap->va_fileid; } and the only other place it is set: vap = &vattr; error = VOP_GETATTR(vp, vap, active_cred, td); if (error) return (error); vp->v_cachedfs = vap->va_fsid; vp->v_cachedid = vap->va_fileid; -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message