Date: 26 Oct 2002 01:36:39 -0400 From: Joe Marcus Clarke <marcus@marcuscom.com> To: John Baldwin <jhb@FreeBSD.org> Cc: Nate Lawson <nate@root.org>, current@FreeBSD.org Subject: Re: libgtop port and v_tag changes Message-ID: <1035610607.1601.25.camel@shumai.marcuscom.com> In-Reply-To: <XFMail.20021025141508.jhb@FreeBSD.org> References: <XFMail.20021025141508.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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:
>
> switch (vp->v_type) {
> case VREG:
> case VDIR:
> case VLNK:
> xvn[n].xv_dev = vp->v_cachedfs;
> xvn[n].xv_ino = vp->v_cachedid;
>
> 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.
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
>
> --
>
> John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
>
--
PGP Key : http://www.marcuscom.com/pgp.asc
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)
iD8DBQA9uinnb2iPiv4Uz4cRAgZ8AKCnjiTDI04q3VYaSlK1S+mpdkhc5wCffbGH
5qZHAqNwjh3t2f3NM7mDEfY=
=Wlt5
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1035610607.1601.25.camel>
