Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Eliminate commons.



details:   https://anonhg.NetBSD.org/src/rev/147484061039
branches:  trunk
changeset: 526860:147484061039
user:      matt <matt%NetBSD.org@localhost>
date:      Sun May 12 23:06:27 2002 +0000

description:
Eliminate commons.

diffstat:

 sys/kern/vfs_bio.c         |  8 ++++++--
 sys/sys/buf.h              |  9 +++++----
 sys/sys/namei.h            |  6 +++++-
 sys/ufs/lfs/lfs_bio.c      |  5 ++---
 sys/ufs/lfs/lfs_extern.h   |  3 ++-
 sys/ufs/lfs/lfs_syscalls.c |  5 ++---
 sys/ufs/lfs/lfs_vfsops.c   |  5 ++---
 sys/ufs/ufs/ufs_lookup.c   |  5 ++---
 8 files changed, 26 insertions(+), 20 deletions(-)

diffs (213 lines):

diff -r a9dc70d76e6a -r 147484061039 sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c        Sun May 12 23:04:35 2002 +0000
+++ b/sys/kern/vfs_bio.c        Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_bio.c,v 1.80 2002/03/16 23:49:59 chs Exp $ */
+/*     $NetBSD: vfs_bio.c,v 1.81 2002/05/12 23:06:27 matt Exp $        */
 
 /*-
  * Copyright (c) 1994 Christopher G. Demetriou
@@ -48,8 +48,10 @@
  *             UNIX Operating System (Addison Welley, 1989)
  */
 
+#include "opt_softdep.h"
+
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.80 2002/03/16 23:49:59 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.81 2002/05/12 23:06:27 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -77,7 +79,9 @@
        (&bufhashtbl[(((long)(dvp) >> 8) + (int)(lbn)) & bufhash])
 LIST_HEAD(bufhashhdr, buf) *bufhashtbl, invalhash;
 u_long bufhash;
+#ifndef SOFTDEP
 struct bio_ops bioops; /* I/O operation notification */
+#endif
 
 /*
  * Insq/Remq for the buffer hash lists.
diff -r a9dc70d76e6a -r 147484061039 sys/sys/buf.h
--- a/sys/sys/buf.h     Sun May 12 23:04:35 2002 +0000
+++ b/sys/sys/buf.h     Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.48 2001/09/15 20:36:40 chs Exp $     */
+/*     $NetBSD: buf.h,v 1.49 2002/05/12 23:06:28 matt Exp $    */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -154,7 +154,7 @@
 struct buf;
 struct mount;
 struct vnode;
-extern struct bio_ops {
+struct bio_ops {
        void    (*io_start) __P((struct buf *));
        void    (*io_complete) __P((struct buf *));
        void    (*io_deallocate) __P((struct buf *));
@@ -163,7 +163,7 @@
        void    (*io_movedeps) __P((struct buf *, struct buf *));
        int     (*io_countdeps) __P((struct buf *, int));
        void    (*io_pageiodone) __P((struct buf *));
-} bioops;
+};
 
 /*
  * The buffer header describes an I/O operation in the kernel.
@@ -265,13 +265,14 @@
 
 #ifdef _KERNEL
 
+extern struct bio_ops bioops;
 extern int nbuf;               /* The number of buffer headers */
 extern struct buf *buf;        /* The buffer headers. */
 extern char *buffers;          /* The buffer contents. */
 extern int bufpages;           /* Number of memory pages in the buffer pool. */
 extern int nswbuf;             /* Number of swap I/O buffer headers. */
 
-extern struct pool bufpool;    /* I/O buf pool */
+extern struct pool bufpool;    /* I/O buf pool */
 
 __BEGIN_DECLS
 void   allocbuf __P((struct buf *, int));
diff -r a9dc70d76e6a -r 147484061039 sys/sys/namei.h
--- a/sys/sys/namei.h   Sun May 12 23:04:35 2002 +0000
+++ b/sys/sys/namei.h   Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: namei.h,v 1.25 2001/12/08 04:10:00 lukem Exp $ */
+/*     $NetBSD: namei.h,v 1.26 2002/05/12 23:06:28 matt Exp $  */
 
 /*
  * Copyright (c) 1985, 1989, 1991, 1993
@@ -214,4 +214,8 @@
        long    ncs_revhits;            /* reverse-cache hits */
        long    ncs_revmiss;            /* reverse-cache misses */
 };
+
+#ifdef _KERNEL
+extern struct nchstats nchstats;
+#endif
 #endif /* !_SYS_NAMEI_H_ */
diff -r a9dc70d76e6a -r 147484061039 sys/ufs/lfs/lfs_bio.c
--- a/sys/ufs/lfs/lfs_bio.c     Sun May 12 23:04:35 2002 +0000
+++ b/sys/ufs/lfs/lfs_bio.c     Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_bio.c,v 1.41 2002/02/11 02:47:29 perseant Exp $    */
+/*     $NetBSD: lfs_bio.c,v 1.42 2002/05/12 23:06:29 matt Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.41 2002/02/11 02:47:29 perseant Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_bio.c,v 1.42 2002/05/12 23:06:29 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -102,7 +102,6 @@
  * No write cost accounting is done.
  * This is almost certainly wrong for synchronous operations and NFS.
  */
-int    lfs_allclean_wakeup;            /* Cleaner wakeup address. */
 int    locked_queue_count   = 0;       /* XXX Count of locked-down buffers. */
 long   locked_queue_bytes   = 0L;      /* XXX Total size of locked buffers. */
 int    lfs_writing          = 0;       /* Set if already kicked off a writer
diff -r a9dc70d76e6a -r 147484061039 sys/ufs/lfs/lfs_extern.h
--- a/sys/ufs/lfs/lfs_extern.h  Sun May 12 23:04:35 2002 +0000
+++ b/sys/ufs/lfs/lfs_extern.h  Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_extern.h,v 1.28 2002/02/11 02:47:29 perseant Exp $ */
+/*     $NetBSD: lfs_extern.h,v 1.29 2002/05/12 23:06:29 matt Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -107,6 +107,7 @@
 struct segment;
 struct ucred;
 
+extern int lfs_allclean_wakeup;
 extern struct pool lfs_inode_pool;             /* memory pool for inodes */
 
 __BEGIN_DECLS
diff -r a9dc70d76e6a -r 147484061039 sys/ufs/lfs/lfs_syscalls.c
--- a/sys/ufs/lfs/lfs_syscalls.c        Sun May 12 23:04:35 2002 +0000
+++ b/sys/ufs/lfs/lfs_syscalls.c        Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_syscalls.c,v 1.63 2001/12/18 07:51:17 chs Exp $    */
+/*     $NetBSD: lfs_syscalls.c,v 1.64 2002/05/12 23:06:29 matt Exp $   */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.63 2001/12/18 07:51:17 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_syscalls.c,v 1.64 2002/05/12 23:06:29 matt Exp $");
 
 #define LFS            /* for prototypes in syscallargs.h */
 
@@ -997,7 +997,6 @@
                syscallarg(fsid_t *) fsidp;
                syscallarg(struct timeval *) tv;
        } */ *uap = v;
-       extern int lfs_allclean_wakeup;
        struct mount *mntp;
        struct timeval atv;
        fsid_t fsid;
diff -r a9dc70d76e6a -r 147484061039 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c  Sun May 12 23:04:35 2002 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c  Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lfs_vfsops.c,v 1.72 2002/03/08 20:48:46 thorpej Exp $  */
+/*     $NetBSD: lfs_vfsops.c,v 1.73 2002/05/12 23:06:29 matt Exp $     */
 
 /*-
  * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.72 2002/03/08 20:48:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.73 2002/05/12 23:06:29 matt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -1162,7 +1162,6 @@
        struct ufsmount *ump;
        struct lfs *fs;
        int error, flags, ronly, s;
-       extern int lfs_allclean_wakeup;
 
        flags = 0;
        if (mntflags & MNT_FORCE)
diff -r a9dc70d76e6a -r 147484061039 sys/ufs/ufs/ufs_lookup.c
--- a/sys/ufs/ufs/ufs_lookup.c  Sun May 12 23:04:35 2002 +0000
+++ b/sys/ufs/ufs/ufs_lookup.c  Sun May 12 23:06:27 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ufs_lookup.c,v 1.38 2001/12/18 10:57:23 fvdl Exp $     */
+/*     $NetBSD: ufs_lookup.c,v 1.39 2002/05/12 23:06:30 matt Exp $     */
 
 /*
  * Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.38 2001/12/18 10:57:23 fvdl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.39 2002/05/12 23:06:30 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -59,7 +59,6 @@
 #include <ufs/ufs/ufs_extern.h>
 #include <ufs/ufs/ufs_bswap.h>
 
-struct nchstats nchstats;
 #ifdef DIAGNOSTIC
 int    dirchk = 1;
 #else



Home | Main Index | Thread Index | Old Index