Make struct swblock kernel only, to make vm/swap_pager.h userland includable.
Move struct swdevt from sys/conf.h to the more appropriate vm/swap_pager.h. Adjust #include use in libkvm and pstat(8) to match.
This commit is contained in:
parent
c410df597b
commit
42c43e6031
@ -13,11 +13,11 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/blist.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include <vm/vm_param.h>
|
||||
#include <vm/swap_pager.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
|
@ -253,22 +253,6 @@ void ldisc_deregister(int);
|
||||
#define LDISC_LOAD -1 /* Loadable line discipline */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Swap device table
|
||||
*/
|
||||
struct swdevt {
|
||||
udev_t sw_dev; /* For quasibogus swapdev reporting */
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
int sw_used;
|
||||
struct vnode *sw_vp;
|
||||
dev_t sw_device;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
#define SW_CLOSING 0x04
|
||||
#define sw_freed sw_flags /* XXX compat */
|
||||
|
||||
#ifdef _KERNEL
|
||||
d_open_t noopen;
|
||||
d_close_t noclose;
|
||||
|
@ -253,22 +253,6 @@ void ldisc_deregister(int);
|
||||
#define LDISC_LOAD -1 /* Loadable line discipline */
|
||||
#endif /* _KERNEL */
|
||||
|
||||
/*
|
||||
* Swap device table
|
||||
*/
|
||||
struct swdevt {
|
||||
udev_t sw_dev; /* For quasibogus swapdev reporting */
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
int sw_used;
|
||||
struct vnode *sw_vp;
|
||||
dev_t sw_device;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
#define SW_CLOSING 0x04
|
||||
#define sw_freed sw_flags /* XXX compat */
|
||||
|
||||
#ifdef _KERNEL
|
||||
d_open_t noopen;
|
||||
d_close_t noclose;
|
||||
|
@ -47,6 +47,24 @@
|
||||
#ifndef _VM_SWAP_PAGER_H_
|
||||
#define _VM_SWAP_PAGER_H_ 1
|
||||
|
||||
/*
|
||||
* Swap device table
|
||||
*/
|
||||
struct swdevt {
|
||||
udev_t sw_dev; /* For quasibogus swapdev reporting */
|
||||
int sw_flags;
|
||||
int sw_nblks;
|
||||
int sw_used;
|
||||
struct vnode *sw_vp;
|
||||
dev_t sw_device;
|
||||
};
|
||||
#define SW_FREED 0x01
|
||||
#define SW_SEQUENTIAL 0x02
|
||||
#define SW_CLOSING 0x04
|
||||
#define sw_freed sw_flags /* XXX compat */
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* SWB_NPAGES must be a power of 2. It may be set to 1, 2, 4, 8, or 16
|
||||
* pages per allocation. We recommend you stick with the default of 8.
|
||||
@ -78,7 +96,6 @@ struct swblock {
|
||||
daddr_t swb_pages[SWAP_META_PAGES];
|
||||
};
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern struct pagerlst swap_pager_un_object_list;
|
||||
extern int swap_pager_full;
|
||||
extern struct blist *swapblist;
|
||||
|
@ -60,11 +60,11 @@ static const char rcsid[] =
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl_compat.h> /* XXX NTTYDISC is too well hidden */
|
||||
#include <sys/tty.h>
|
||||
#include <sys/conf.h>
|
||||
#include <sys/blist.h>
|
||||
|
||||
#include <sys/user.h>
|
||||
#include <sys/sysctl.h>
|
||||
#include <vm/swap_pager.h>
|
||||
|
||||
#include <err.h>
|
||||
#include <fcntl.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user