diff options
author | phk <phk@FreeBSD.org> | 1997-10-12 20:26:33 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-10-12 20:26:33 +0000 |
commit | 36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5 (patch) | |
tree | e21c1d8330cbd5fba838afec549f8e4f0f66e451 /sys/nfsclient | |
parent | 8ae70d2227594ff4a283453ca3cc3031eb78c14b (diff) | |
download | FreeBSD-src-36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5.zip FreeBSD-src-36e7a51ea1dedf0fc860ff3106aee1db1ab3b1f5.tar.gz |
Last major round (Unless Bruce thinks of somthing :-) of malloc changes.
Distribute all but the most fundamental malloc types. This time I also
remembered the trick to making things static: Put "static" in front of
them.
A couple of finer points by: bde
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/krpc_subr.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs.h | 13 | ||||
-rw-r--r-- | sys/nfsclient/nfs_nfsiod.c | 6 | ||||
-rw-r--r-- | sys/nfsclient/nfs_node.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_socket.c | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 13 | ||||
-rw-r--r-- | sys/nfsclient/nfsargs.h | 13 | ||||
-rw-r--r-- | sys/nfsclient/nfsstats.h | 13 |
8 files changed, 56 insertions, 14 deletions
diff --git a/sys/nfsclient/krpc_subr.c b/sys/nfsclient/krpc_subr.c index 5423686..6801b93 100644 --- a/sys/nfsclient/krpc_subr.c +++ b/sys/nfsclient/krpc_subr.c @@ -1,5 +1,5 @@ /* $NetBSD: krpc_subr.c,v 1.12.4.1 1996/06/07 00:52:26 cgd Exp $ */ -/* $Id: krpc_subr.c,v 1.4 1997/08/16 19:15:53 wollman Exp $ */ +/* $Id: krpc_subr.c,v 1.5 1997/09/02 01:19:26 bde Exp $ */ /* * Copyright (c) 1995 Gordon Ross, Adam Glass @@ -48,8 +48,8 @@ #include <sys/conf.h> #include <sys/sockio.h> #include <sys/proc.h> -#include <sys/mount.h> #include <sys/malloc.h> +#include <sys/mount.h> #include <sys/mbuf.h> #include <sys/reboot.h> #include <sys/socket.h> diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsclient/nfs_nfsiod.c b/sys/nfsclient/nfs_nfsiod.c index 8e3955e..fcf1745 100644 --- a/sys/nfsclient/nfs_nfsiod.c +++ b/sys/nfsclient/nfs_nfsiod.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_syscalls.c,v 1.27 1997/08/16 19:16:00 wollman Exp $ + * $Id: nfs_syscalls.c,v 1.28 1997/10/11 18:31:35 phk Exp $ */ #include <sys/param.h> @@ -46,10 +46,10 @@ #include <sys/filedesc.h> #include <sys/stat.h> #include <sys/vnode.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/proc.h> #include <sys/uio.h> -#include <sys/malloc.h> #include <sys/buf.h> #include <sys/mbuf.h> #include <sys/socket.h> @@ -75,7 +75,7 @@ #include <nfs/nqnfs.h> #include <nfs/nfsrtt.h> -MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); +static MALLOC_DEFINE(M_NFSSVC, "NFS srvsock", "Nfs server structure"); /* Global defs. */ extern int (*nfsrv3_procs[NFS_NPROCS]) __P((struct nfsrv_descript *nd, diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index ee186ea..97d58ee 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_node.c 8.6 (Berkeley) 5/22/95 - * $Id: nfs_node.c,v 1.19 1997/09/21 04:23:45 dyson Exp $ + * $Id: nfs_node.c,v 1.20 1997/10/11 18:31:34 phk Exp $ */ @@ -51,7 +51,7 @@ #include <nfs/nfsnode.h> #include <nfs/nfsmount.h> -MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); +static MALLOC_DEFINE(M_NFSNODE, "NFS node", "NFS vnode private part"); LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl; u_long nfsnodehash; diff --git a/sys/nfsclient/nfs_socket.c b/sys/nfsclient/nfs_socket.c index 82999f2..55ee3ed 100644 --- a/sys/nfsclient/nfs_socket.c +++ b/sys/nfsclient/nfs_socket.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_socket.c 8.5 (Berkeley) 3/30/95 - * $Id: nfs_socket.c,v 1.27 1997/08/16 19:15:57 wollman Exp $ + * $Id: nfs_socket.c,v 1.28 1997/09/02 01:19:37 bde Exp $ */ /* @@ -44,9 +44,9 @@ #include <sys/param.h> #include <sys/systm.h> #include <sys/proc.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/kernel.h> -#include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/vnode.h> #include <sys/domain.h> diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 45d7edb..011b4ab 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.12 (Berkeley) 5/20/95 - * $Id: nfs_vfsops.c,v 1.47 1997/09/07 12:56:44 bde Exp $ + * $Id: nfs_vfsops.c,v 1.48 1997/09/10 19:52:26 phk Exp $ */ #include <sys/param.h> @@ -46,9 +46,9 @@ #include <sys/vnode.h> #include <sys/kernel.h> #include <sys/sysctl.h> +#include <sys/malloc.h> #include <sys/mount.h> #include <sys/buf.h> -#include <sys/malloc.h> #include <sys/mbuf.h> #include <sys/socket.h> #include <sys/socketvar.h> @@ -76,6 +76,15 @@ extern int nfs_mountroot __P((struct mount *mp)); extern int nfs_ticks; +MALLOC_DEFINE(M_NFSREQ, "NFS req", "NFS request header"); +MALLOC_DEFINE(M_NFSMNT, "NFS mount", "NFS mount structure"); +MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle"); +MALLOC_DEFINE(M_NFSD, "NFS daemon", "Nfs server daemon structure"); +MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data"); +MALLOC_DEFINE(M_NFSRVDESC, "NFSV3 srvdesc", "NFS server socket descriptor"); +MALLOC_DEFINE(M_NFSUID, "NFS uid", "Nfs uid mapping structure"); +MALLOC_DEFINE(M_NQLEASE, "NQNFS Lease", "Nqnfs lease"); + struct nfsstats nfsstats; SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfsargs.h +++ b/sys/nfsclient/nfsargs.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ diff --git a/sys/nfsclient/nfsstats.h b/sys/nfsclient/nfsstats.h index 8fa52f3..cd1db27 100644 --- a/sys/nfsclient/nfsstats.h +++ b/sys/nfsclient/nfsstats.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs.h 8.4 (Berkeley) 5/1/95 - * $Id: nfs.h,v 1.30 1997/08/16 19:15:54 wollman Exp $ + * $Id: nfs.h,v 1.31 1997/09/10 19:52:24 phk Exp $ */ #ifndef _NFS_NFS_H_ @@ -300,6 +300,17 @@ struct nfsstats { */ #ifdef KERNEL +#ifdef MALLOC_DECLARE +MALLOC_DECLARE(M_NFSREQ); +MALLOC_DECLARE(M_NFSMNT); +MALLOC_DECLARE(M_NFSDIROFF); +MALLOC_DECLARE(M_NFSRVDESC); +MALLOC_DECLARE(M_NFSUID); +MALLOC_DECLARE(M_NQLEASE); +MALLOC_DECLARE(M_NFSD); +MALLOC_DECLARE(M_NFSBIGFH); +#endif + struct uio; struct buf; struct vattr; struct nameidata; /* XXX */ #define NFSINT_SIGMASK (sigmask(SIGINT)|sigmask(SIGTERM)|sigmask(SIGKILL)| \ |