Re: libgtop port and v_tag changes

2002-10-29 Thread John Baldwin
On 29-Oct-2002 Joe Marcus Clarke wrote: On Mon, 2002-10-28 at 16:37, John Baldwin wrote: On 28-Oct-2002 Joe Marcus Clarke wrote: On Mon, 2002-10-28 at 16:27, John Baldwin wrote: On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for?

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
On 26-Oct-2002 Joe Marcus Clarke wrote: 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

Re: libgtop port and v_tag changes

2002-10-28 Thread Terry Lambert
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

Re: libgtop port and v_tag changes

2002-10-28 Thread Jeff Roberson
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

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
On 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

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
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

Re: libgtop port and v_tag changes

2002-10-28 Thread Jeff Roberson
On Mon, 28 Oct 2002, John Baldwin wrote: 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.

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
On 28-Oct-2002 John Baldwin wrote: On 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

Re: libgtop port and v_tag changes

2002-10-28 Thread Terry Lambert
John Baldwin wrote: Sheesh, does anyone actually _use_ libgtop against kernel core dumps? If not then it shouldn't be groveling around in the kernel fondling implementation details. Instead, it should be using stat(2), or at the worst using a sysctl to get xvnode structures. As an

Re: libgtop port and v_tag changes

2002-10-28 Thread Terry Lambert
John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that display load averages and other silly system monitor stuff in small spaces in GUI's. It seems to work quite happily w/o any inode numbers or dev_t's for non-UFS filesystems. I just don't

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that display load averages and other silly system monitor stuff in small spaces in GUI's. It seems to work quite happily w/o any inode numbers or dev_t's

Re: libgtop port and v_tag changes

2002-10-28 Thread Joe Marcus Clarke
On Mon, 2002-10-28 at 16:27, John Baldwin wrote: On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that display load averages and other silly system monitor stuff in small spaces in GUI's. It seems to

Re: libgtop port and v_tag changes

2002-10-28 Thread John Baldwin
On 28-Oct-2002 Joe Marcus Clarke wrote: On Mon, 2002-10-28 at 16:27, John Baldwin wrote: On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that display load averages and other silly system monitor

Re: libgtop port and v_tag changes

2002-10-28 Thread Joe Marcus Clarke
On Mon, 2002-10-28 at 16:37, John Baldwin wrote: On 28-Oct-2002 Joe Marcus Clarke wrote: On Mon, 2002-10-28 at 16:27, John Baldwin wrote: On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that

Re: libgtop port and v_tag changes

2002-10-28 Thread Nate Lawson
On Mon, 28 Oct 2002, John Baldwin wrote: On 28-Oct-2002 Joe Marcus Clarke wrote: You're probably right. But without waiting to re-architect libgtop, I think the immediate problem needs to be fixed. Shall I just commit my original patch that uses libkvm? Use v_cachedid and v_cachedfs

Re: libgtop port and v_tag changes

2002-10-28 Thread Terry Lambert
John Baldwin wrote: To build little applets that activate a flashing red light when certain files are written? Why do you need the inode number to do that. Just kqueue on the file itself using a regular fd, and in that case you can stat(2) the file if you really need the i-node number.

Re: libgtop port and v_tag changes

2002-10-28 Thread Joe Marcus Clarke
On Mon, 2002-10-28 at 16:37, John Baldwin wrote: On 28-Oct-2002 Joe Marcus Clarke wrote: On Mon, 2002-10-28 at 16:27, John Baldwin wrote: On 28-Oct-2002 Terry Lambert wrote: John Baldwin wrote: I mean, do you know what libgtop is used for? It's used to draw little applets that

Re: libgtop port and v_tag changes

2002-10-25 Thread Joe Marcus Clarke
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

Re: libgtop port and v_tag changes

2002-10-25 Thread Nate Lawson
On 24 Oct 2002, Joe Marcus Clarke wrote: I committed my patch to libgtop and libgtop2 a while ago. It should work on both -CURRENT, not so -CURRENT, and -stable. Checkout patch-ah in libgtop/files. Works like a champ on -CURRENT from Monday. Thanks for taking care of that. -Nate To

Re: libgtop port and v_tag changes

2002-10-25 Thread John Baldwin
On 25-Oct-2002 Joe Marcus Clarke wrote: On Thu, 2002-10-24 at 19:13, Nate Lawson wrote: On Thu, 24 Oct 2002, John Baldwin wrote: Speaking of v_tag, can you fix the devel/libgtop port on current? This is the patch I used to get it building the other day: cat

Re: libgtop port and v_tag changes

2002-10-25 Thread Nate Lawson
On Fri, 25 Oct 2002, Joe Marcus Clarke wrote: On Fri, 25 Oct 2002, John Baldwin wrote: It does?! v_tag is a pointer to kernel memory, you can't read that from userland! You would get a SIGSEGV and die as soon as you do the 'strcmp()'. That's why I #ifdef'd the whole chunk out. Also,

Re: libgtop port and v_tag changes

2002-10-25 Thread John Baldwin
On 25-Oct-2002 Joe Marcus Clarke wrote: On Fri, 25 Oct 2002, John Baldwin wrote: On 25-Oct-2002 Joe Marcus Clarke wrote: On Thu, 2002-10-24 at 19:13, Nate Lawson wrote: On Thu, 24 Oct 2002, John Baldwin wrote: Speaking of v_tag, can you fix the devel/libgtop port on current? This

libgtop port and v_tag changes

2002-10-24 Thread Nate Lawson
On Thu, 24 Oct 2002, John Baldwin wrote: Speaking of v_tag, can you fix the devel/libgtop port on current? This is the patch I used to get it building the other day: cat patch-sysdeps_freebsd_procmap.c --- sysdeps/freebsd/procmap.c.orig Tue Oct 15 20:00:35 2002 +++

Re: libgtop port and v_tag changes

2002-10-24 Thread Joe Marcus Clarke
On Thu, 2002-10-24 at 19:13, Nate Lawson wrote: On Thu, 24 Oct 2002, John Baldwin wrote: Speaking of v_tag, can you fix the devel/libgtop port on current? This is the patch I used to get it building the other day: cat patch-sysdeps_freebsd_procmap.c --- sysdeps/freebsd/procmap.c.orig