Eliminate commons

This commit is contained in:
matt 2002-05-12 23:04:35 +00:00
parent 602066c0d6
commit caf4b56c6f
7 changed files with 40 additions and 25 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs.h,v 1.32 2001/11/29 21:22:50 christos Exp $ */ /* $NetBSD: nfs.h,v 1.33 2002/05/12 23:04:35 matt Exp $ */
/* /*
* Copyright (c) 1989, 1993, 1995 * Copyright (c) 1989, 1993, 1995
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
@ -314,7 +314,7 @@ struct nfsreq {
/* /*
* Queue head for nfsreq's * Queue head for nfsreq's
*/ */
TAILQ_HEAD(, nfsreq) nfs_reqq; extern TAILQ_HEAD(nfsreqhead, nfsreq) nfs_reqq;
/* Flag values for r_flags */ /* Flag values for r_flags */
#define R_TIMING 0x01 /* timing request (in mntp) */ #define R_TIMING 0x01 /* timing request (in mntp) */
@ -438,8 +438,8 @@ struct nfssvc_sock {
#define SLP_LASTFRAG 0x20 #define SLP_LASTFRAG 0x20
#define SLP_ALLFLAGS 0xff #define SLP_ALLFLAGS 0xff
TAILQ_HEAD(, nfssvc_sock) nfssvc_sockhead; extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead;
int nfssvc_sockhead_flag; extern int nfssvc_sockhead_flag;
#define SLP_INIT 0x01 #define SLP_INIT 0x01
#define SLP_WANTINIT 0x02 #define SLP_WANTINIT 0x02
@ -504,10 +504,13 @@ struct nfsrv_descript {
#define ND_KERBFULL 0x40 #define ND_KERBFULL 0x40
#define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL) #define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL)
TAILQ_HEAD(, nfsd) nfsd_head; extern TAILQ_HEAD(nfsdhead, nfsd) nfsd_head;
int nfsd_head_flag; extern int nfsd_head_flag;
#define NFSD_CHECKSLP 0x01 #define NFSD_CHECKSLP 0x01
extern struct nfsstats nfsstats;
extern int nfs_numasync;
/* /*
* These macros compare nfsrv_descript structures. * These macros compare nfsrv_descript structures.
*/ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_nqlease.c,v 1.39 2001/11/10 10:59:09 lukem Exp $ */ /* $NetBSD: nfs_nqlease.c,v 1.40 2002/05/12 23:04:35 matt Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -53,7 +53,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_nqlease.c,v 1.39 2001/11/10 10:59:09 lukem Exp $"); __KERNEL_RCSID(0, "$NetBSD: nfs_nqlease.c,v 1.40 2002/05/12 23:04:35 matt Exp $");
#include "fs_nfs.h" #include "fs_nfs.h"
#include "opt_nfs.h" #include "opt_nfs.h"
@ -95,6 +95,10 @@ int nqsrv_writeslack = NQ_WRITESLACK;
int nqsrv_maxlease = NQ_MAXLEASE; int nqsrv_maxlease = NQ_MAXLEASE;
int nqsrv_maxnumlease = NQ_MAXNUMLEASE; int nqsrv_maxnumlease = NQ_MAXNUMLEASE;
struct nqleasehead nqtimerhead;
struct nqfhhashhead *nqfhhashtbl;
u_long nqfhhash;
/* /*
* Signifies which rpcs can have piggybacked lease requests * Signifies which rpcs can have piggybacked lease requests
*/ */

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_socket.c,v 1.73 2002/03/17 22:22:39 christos Exp $ */ /* $NetBSD: nfs_socket.c,v 1.74 2002/05/12 23:04:36 matt Exp $ */
/* /*
* Copyright (c) 1989, 1991, 1993, 1995 * Copyright (c) 1989, 1991, 1993, 1995
@ -43,7 +43,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.73 2002/03/17 22:22:39 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: nfs_socket.c,v 1.74 2002/05/12 23:04:36 matt Exp $");
#include "fs_nfs.h" #include "fs_nfs.h"
#include "opt_nfs.h" #include "opt_nfs.h"
@ -112,7 +112,6 @@ extern u_int32_t rpc_reply, rpc_msgdenied, rpc_mismatch, rpc_vers,
rpc_auth_kerb; rpc_auth_kerb;
extern u_int32_t nfs_prog, nqnfs_prog; extern u_int32_t nfs_prog, nqnfs_prog;
extern time_t nqnfsstarttime; extern time_t nqnfsstarttime;
extern struct nfsstats nfsstats;
extern int nfsv3_procid[NFS_NPROCS]; extern int nfsv3_procid[NFS_NPROCS];
extern int nfs_ticks; extern int nfs_ticks;
@ -147,6 +146,7 @@ static const int proct[NFS_NPROCS] = {
static const int nfs_backoff[8] = { 2, 4, 8, 16, 32, 64, 128, 256, }; static const int nfs_backoff[8] = { 2, 4, 8, 16, 32, 64, 128, 256, };
int nfsrtton = 0; int nfsrtton = 0;
struct nfsrtt nfsrtt; struct nfsrtt nfsrtt;
struct nfsreqhead nfs_reqq;
struct callout nfs_timer_ch = CALLOUT_INITIALIZER; struct callout nfs_timer_ch = CALLOUT_INITIALIZER;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_syscalls.c,v 1.50 2001/11/29 21:23:13 christos Exp $ */ /* $NetBSD: nfs_syscalls.c,v 1.51 2002/05/12 23:04:36 matt Exp $ */
/* /*
* Copyright (c) 1989, 1993 * Copyright (c) 1989, 1993
@ -39,7 +39,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.50 2001/11/29 21:23:13 christos Exp $"); __KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.51 2002/05/12 23:04:36 matt Exp $");
#include "fs_nfs.h" #include "fs_nfs.h"
#include "opt_nfs.h" #include "opt_nfs.h"
@ -93,12 +93,9 @@ __KERNEL_RCSID(0, "$NetBSD: nfs_syscalls.c,v 1.50 2001/11/29 21:23:13 christos E
extern int32_t (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *, extern int32_t (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *,
struct nfssvc_sock *, struct nfssvc_sock *,
struct proc *, struct mbuf **)); struct proc *, struct mbuf **));
extern int nfs_numasync;
extern time_t nqnfsstarttime; extern time_t nqnfsstarttime;
extern int nqsrv_writeslack;
extern int nfsrtton;
extern struct nfsstats nfsstats;
extern int nfsrvw_procrastinate; extern int nfsrvw_procrastinate;
struct nfssvc_sock *nfs_udpsock; struct nfssvc_sock *nfs_udpsock;
#ifdef ISO #ifdef ISO
struct nfssvc_sock *nfs_cltpsock; struct nfssvc_sock *nfs_cltpsock;
@ -115,6 +112,12 @@ static int modify_flag = 0;
static struct nfsdrt nfsdrt; static struct nfsdrt nfsdrt;
#endif #endif
struct nfssvc_sockhead nfssvc_sockhead;
struct nfsdhead nfsd_head;
int nfssvc_sockhead_flag;
int nfsd_head_flag;
#define TRUE 1 #define TRUE 1
#define FALSE 0 #define FALSE 0

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfs_vnops.c,v 1.149 2002/02/28 21:38:08 fvdl Exp $ */ /* $NetBSD: nfs_vnops.c,v 1.150 2002/05/12 23:04:37 matt Exp $ */
/* /*
* Copyright (c) 1989, 1993 * Copyright (c) 1989, 1993
@ -43,7 +43,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.149 2002/02/28 21:38:08 fvdl Exp $"); __KERNEL_RCSID(0, "$NetBSD: nfs_vnops.c,v 1.150 2002/05/12 23:04:37 matt Exp $");
#include "opt_nfs.h" #include "opt_nfs.h"
#include "opt_uvmhist.h" #include "opt_uvmhist.h"
@ -264,8 +264,8 @@ const struct vnodeopv_desc fifo_nfsv2nodeop_opv_desc =
*/ */
extern u_int32_t nfs_true, nfs_false; extern u_int32_t nfs_true, nfs_false;
extern u_int32_t nfs_xdrneg1; extern u_int32_t nfs_xdrneg1;
extern struct nfsstats nfsstats;
extern nfstype nfsv3_type[9]; extern nfstype nfsv3_type[9];
struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON]; struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON]; struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
int nfs_numasync = 0; int nfs_numasync = 0;

View File

@ -1,4 +1,4 @@
/* $NetBSD: nfsrtt.h,v 1.5 1997/05/12 23:36:08 fvdl Exp $ */ /* $NetBSD: nfsrtt.h,v 1.6 2002/05/12 23:04:37 matt Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -102,4 +102,8 @@ struct nfsdrt {
} drt[NFSRTTLOGSIZ]; } drt[NFSRTTLOGSIZ];
}; };
#ifdef _KERNEL
extern int nfsrtton;
#endif
#endif #endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: nqnfs.h,v 1.7 2000/06/09 00:00:18 fvdl Exp $ */ /* $NetBSD: nqnfs.h,v 1.8 2002/05/12 23:04:37 matt Exp $ */
/* /*
* Copyright (c) 1992, 1993 * Copyright (c) 1992, 1993
@ -184,15 +184,16 @@ struct nqm {
/* /*
* List head for timer queue. * List head for timer queue.
*/ */
CIRCLEQ_HEAD(, nqlease) nqtimerhead; extern CIRCLEQ_HEAD(nqleasehead, nqlease) nqtimerhead;
/* /*
* List head for the file handle hash table. * List head for the file handle hash table.
*/ */
#define NQFHHASH(f) \ #define NQFHHASH(f) \
(&nqfhhashtbl[(*((u_int32_t *)(f))) & nqfhhash]) (&nqfhhashtbl[(*((u_int32_t *)(f))) & nqfhhash])
LIST_HEAD(nqfhhashhead, nqlease) *nqfhhashtbl; extern LIST_HEAD(nqfhhashhead, nqlease) *nqfhhashtbl;
u_long nqfhhash; extern u_long nqfhhash;
extern int nqsrv_writeslack;
/* /*
* Nqnfs return status numbers. * Nqnfs return status numbers.