From owner-freebsd-current Fri Oct 25 22:36:50 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 B74D637B401; Fri, 25 Oct 2002 22:36:48 -0700 (PDT) Received: from creme-brulee.marcuscom.com (rdu57-17-158.nc.rr.com [66.57.17.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id D752943E65; Fri, 25 Oct 2002 22:36:47 -0700 (PDT) (envelope-from marcus@marcuscom.com) Received: from shumai.marcuscom.com (shumai.marcuscom.com [192.168.1.4]) by creme-brulee.marcuscom.com (8.12.6/8.12.6) with ESMTP id g9Q5Zt01087662; Sat, 26 Oct 2002 01:35:56 -0400 (EDT) (envelope-from marcus@marcuscom.com) Subject: Re: libgtop port and v_tag changes From: Joe Marcus Clarke To: John Baldwin Cc: Nate Lawson , current@FreeBSD.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-ReB0QpwuLPG953j75g9L" X-Mailer: Ximian Evolution 1.0.8 Date: 26 Oct 2002 01:36:39 -0400 Message-Id: <1035610607.1601.25.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Spam-Status: No, hits=-7.9 required=5.0 tests=AWL,IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES, SPAM_PHRASE_03_05 version=2.41 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 --=-ReB0QpwuLPG953j75g9L Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Fri, 2002-10-25 at 14:15, John Baldwin wrote: > Well, here's the thing. If libgtop is intended to be used only with live > kernels then it might be a better idea to use xvnode's that you get with > from the kernel. Alternatively, you could grab the inode and dev number > the same way the sysctl handler does: >=20 > switch (vp->v_type) { > case VREG: > case VDIR: > case VLNK: > xvn[n].xv_dev =3D vp->v_cachedfs; > xvn[n].xv_ino =3D vp->v_cachedid; >=20 > i.e., you could look at those members of struct vnode instead of trying > to dig into the details of a UFS inode structure in v_data. This > would remove the need to look at v_tag at all. I can certainly do it this way, but would it be equivalent to the existing code? It doesn't seem like it would be. At least using the kvm_read method, we get similar behavior for both -stable and -CURRENT.=20 Correct me if I'm wrong, but the current code is looking at UFS inodes, where as you're suggesting to look at generic vnodes. Joe >=20 > --=20 >=20 > John Baldwin <>< http://www.FreeBSD.org/~jhb/ > "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ >=20 --=20 PGP Key : http://www.marcuscom.com/pgp.asc --=-ReB0QpwuLPG953j75g9L Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQA9uinnb2iPiv4Uz4cRAgZ8AKCnjiTDI04q3VYaSlK1S+mpdkhc5wCffbGH 5qZHAqNwjh3t2f3NM7mDEfY= =Wlt5 -----END PGP SIGNATURE----- --=-ReB0QpwuLPG953j75g9L-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message