Date: Tue, 6 Feb 2007 15:57:24 -0500 From: John Baldwin <jhb@freebsd.org> To: "Attilio Rao" <attilio@freebsd.org> Cc: arch@freebsd.org Subject: Re: Restoring crash dump ability for kvm_getswapinfo(3) Message-ID: <200702061557.24646.jhb@freebsd.org> In-Reply-To: <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com> References: <200702061537.54056.jhb@freebsd.org> <3bbf2fe10702061246ofdc00a6kc9ba5366aea4e2e2@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 06 February 2007 15:46, Attilio Rao wrote: > 2007/2/6, John Baldwin <jhb@freebsd.org>: > > The patch below fixes kvm_getswapinfo(3) (and thus pstat -T/pstat -s/swapinfo) > > on crash dumps. The one ugliness in it is that since 'struct swdevt' was > > moved into swap_pager.c, there is no longer a header that I can include to > > get it (used to be in vm/swap_pager.h) so I have a copy of the structure in > > kvm_getswapinfo.c. I'd prefer to move the structures back into > > vm/swap_pager.h. > > > > Index: kvm_getswapinfo.c > > =================================================================== > > RCS file: /usr/cvs/src/lib/libkvm/kvm_getswapinfo.c,v > > retrieving revision 1.26 > > diff -u -r1.26 kvm_getswapinfo.c > > --- kvm_getswapinfo.c 31 Jul 2004 18:49:53 -0000 1.26 > > +++ kvm_getswapinfo.c 6 Feb 2007 20:31:09 -0000 > > @@ -49,18 +49,59 @@ > > > > #include "kvm_private.h" > > > > -#define NL_SWAPBLIST 0 > > -#define NL_SWDEVT 1 > > -#define NL_NSWDEV 2 > > -#define NL_DMMAX 3 > > +/* Grrr, this is hidden in swap_pager.c now, how annoying. */ > > +typedef int32_t swblk_t; > > It would not be better exporting swblk_t definition into swap_pager.h, > while you are here? Yes, as I mentioned, I would prefer that, but they were explicitly moved from swap_pager.h to swap_pager.c previously, so I'd like to make sure it is ok to move them back. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702061557.24646.jhb>