Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/nfs Eliminate commons
details: https://anonhg.NetBSD.org/src/rev/a9dc70d76e6a
branches: trunk
changeset: 526859:a9dc70d76e6a
user: matt <matt%NetBSD.org@localhost>
date: Sun May 12 23:04:35 2002 +0000
description:
Eliminate commons
diffstat:
sys/nfs/nfs.h | 15 +++++++++------
sys/nfs/nfs_nqlease.c | 8 ++++++--
sys/nfs/nfs_socket.c | 6 +++---
sys/nfs/nfs_syscalls.c | 15 +++++++++------
sys/nfs/nfs_vnops.c | 6 +++---
sys/nfs/nfsrtt.h | 6 +++++-
sys/nfs/nqnfs.h | 9 +++++----
7 files changed, 40 insertions(+), 25 deletions(-)
diffs (228 lines):
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfs.h
--- a/sys/nfs/nfs.h Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfs.h Sun May 12 23:04:35 2002 +0000
@@ -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
* The Regents of the University of California. All rights reserved.
@@ -314,7 +314,7 @@
/*
* Queue head for nfsreq's
*/
-TAILQ_HEAD(, nfsreq) nfs_reqq;
+extern TAILQ_HEAD(nfsreqhead, nfsreq) nfs_reqq;
/* Flag values for r_flags */
#define R_TIMING 0x01 /* timing request (in mntp) */
@@ -438,8 +438,8 @@
#define SLP_LASTFRAG 0x20
#define SLP_ALLFLAGS 0xff
-TAILQ_HEAD(, nfssvc_sock) nfssvc_sockhead;
-int nfssvc_sockhead_flag;
+extern TAILQ_HEAD(nfssvc_sockhead, nfssvc_sock) nfssvc_sockhead;
+extern int nfssvc_sockhead_flag;
#define SLP_INIT 0x01
#define SLP_WANTINIT 0x02
@@ -504,10 +504,13 @@
#define ND_KERBFULL 0x40
#define ND_KERBAUTH (ND_KERBNICK | ND_KERBFULL)
-TAILQ_HEAD(, nfsd) nfsd_head;
-int nfsd_head_flag;
+extern TAILQ_HEAD(nfsdhead, nfsd) nfsd_head;
+extern int nfsd_head_flag;
#define NFSD_CHECKSLP 0x01
+extern struct nfsstats nfsstats;
+extern int nfs_numasync;
+
/*
* These macros compare nfsrv_descript structures.
*/
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfs_nqlease.c
--- a/sys/nfs/nfs_nqlease.c Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfs_nqlease.c Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -53,7 +53,7 @@
*/
#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 "opt_nfs.h"
@@ -95,6 +95,10 @@
int nqsrv_maxlease = NQ_MAXLEASE;
int nqsrv_maxnumlease = NQ_MAXNUMLEASE;
+struct nqleasehead nqtimerhead;
+struct nqfhhashhead *nqfhhashtbl;
+u_long nqfhhash;
+
/*
* Signifies which rpcs can have piggybacked lease requests
*/
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfs_socket.c
--- a/sys/nfs/nfs_socket.c Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfs_socket.c Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -43,7 +43,7 @@
*/
#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 "opt_nfs.h"
@@ -112,7 +112,6 @@
rpc_auth_kerb;
extern u_int32_t nfs_prog, nqnfs_prog;
extern time_t nqnfsstarttime;
-extern struct nfsstats nfsstats;
extern int nfsv3_procid[NFS_NPROCS];
extern int nfs_ticks;
@@ -147,6 +146,7 @@
static const int nfs_backoff[8] = { 2, 4, 8, 16, 32, 64, 128, 256, };
int nfsrtton = 0;
struct nfsrtt nfsrtt;
+struct nfsreqhead nfs_reqq;
struct callout nfs_timer_ch = CALLOUT_INITIALIZER;
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfs_syscalls.c
--- a/sys/nfs/nfs_syscalls.c Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfs_syscalls.c Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -39,7 +39,7 @@
*/
#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 "opt_nfs.h"
@@ -93,12 +93,9 @@
extern int32_t (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *,
struct nfssvc_sock *,
struct proc *, struct mbuf **));
-extern int nfs_numasync;
extern time_t nqnfsstarttime;
-extern int nqsrv_writeslack;
-extern int nfsrtton;
-extern struct nfsstats nfsstats;
extern int nfsrvw_procrastinate;
+
struct nfssvc_sock *nfs_udpsock;
#ifdef ISO
struct nfssvc_sock *nfs_cltpsock;
@@ -115,6 +112,12 @@
static struct nfsdrt nfsdrt;
#endif
+struct nfssvc_sockhead nfssvc_sockhead;
+struct nfsdhead nfsd_head;
+
+int nfssvc_sockhead_flag;
+int nfsd_head_flag;
+
#define TRUE 1
#define FALSE 0
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfs_vnops.c
--- a/sys/nfs/nfs_vnops.c Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfs_vnops.c Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -43,7 +43,7 @@
*/
#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_uvmhist.h"
@@ -264,8 +264,8 @@
*/
extern u_int32_t nfs_true, nfs_false;
extern u_int32_t nfs_xdrneg1;
-extern struct nfsstats nfsstats;
extern nfstype nfsv3_type[9];
+
struct proc *nfs_iodwant[NFS_MAXASYNCDAEMON];
struct nfsmount *nfs_iodmount[NFS_MAXASYNCDAEMON];
int nfs_numasync = 0;
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nfsrtt.h
--- a/sys/nfs/nfsrtt.h Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nfsrtt.h Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -102,4 +102,8 @@
} drt[NFSRTTLOGSIZ];
};
+#ifdef _KERNEL
+extern int nfsrtton;
#endif
+
+#endif
diff -r 0a544cb647dd -r a9dc70d76e6a sys/nfs/nqnfs.h
--- a/sys/nfs/nqnfs.h Sun May 12 23:04:15 2002 +0000
+++ b/sys/nfs/nqnfs.h Sun May 12 23:04:35 2002 +0000
@@ -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
@@ -184,15 +184,16 @@
/*
* List head for timer queue.
*/
-CIRCLEQ_HEAD(, nqlease) nqtimerhead;
+extern CIRCLEQ_HEAD(nqleasehead, nqlease) nqtimerhead;
/*
* List head for the file handle hash table.
*/
#define NQFHHASH(f) \
(&nqfhhashtbl[(*((u_int32_t *)(f))) & nqfhhash])
-LIST_HEAD(nqfhhashhead, nqlease) *nqfhhashtbl;
-u_long nqfhhash;
+extern LIST_HEAD(nqfhhashhead, nqlease) *nqfhhashtbl;
+extern u_long nqfhhash;
+extern int nqsrv_writeslack;
/*
* Nqnfs return status numbers.
Home |
Main Index |
Thread Index |
Old Index