diff options
author | jeff <jeff@FreeBSD.org> | 2002-03-20 10:07:52 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2002-03-20 10:07:52 +0000 |
commit | 5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976 (patch) | |
tree | 397a2dd149ec84023ae2f0cdea08eb53dc029e8d /sys/nfsclient | |
parent | d0f60a59c9bb4d69370dd8ce40f1baf9c6f26046 (diff) | |
download | FreeBSD-src-5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976.zip FreeBSD-src-5cc8ffe0d4d9b652c6008e25f3fc1c6a8fd51976.tar.gz |
Remove references to vm_zone.h and switch over to the new uma API.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r-- | sys/nfsclient/nfs.h | 4 | ||||
-rw-r--r-- | sys/nfsclient/nfs_node.c | 15 | ||||
-rw-r--r-- | sys/nfsclient/nfs_subs.c | 5 | ||||
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 10 |
4 files changed, 17 insertions, 17 deletions
diff --git a/sys/nfsclient/nfs.h b/sys/nfsclient/nfs.h index 7a0f758..8836eb4 100644 --- a/sys/nfsclient/nfs.h +++ b/sys/nfsclient/nfs.h @@ -122,9 +122,7 @@ MALLOC_DECLARE(M_NFSBIGFH); MALLOC_DECLARE(M_NFSHASH); #endif -#ifdef ZONE_INTERRUPT -extern vm_zone_t nfsmount_zone; -#endif +extern uma_zone_t nfsmount_zone; extern struct callout_handle nfs_timer_handle; extern struct nfsstats nfsstats; diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index ed19723..e3d8170 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include <sys/sysctl.h> #include <sys/vnode.h> -#include <vm/vm_zone.h> +#include <vm/uma.h> #include <nfs/rpcv2.h> #include <nfs/nfsproto.h> @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #include <nfsclient/nfsnode.h> #include <nfsclient/nfsmount.h> -static vm_zone_t nfsnode_zone; +static uma_zone_t nfsnode_zone; static LIST_HEAD(nfsnodehashhead, nfsnode) *nfsnodehashtbl; static u_long nfsnodehash; static int nfs_node_hash_lock; @@ -154,7 +154,8 @@ void nfs_nhinit(void) { - nfsnode_zone = zinit("NFSNODE", sizeof(struct nfsnode), 0, 0, 1); + nfsnode_zone = uma_zcreate("NFSNODE", sizeof(struct nfsnode), NULL, + NULL, NULL, NULL, UMA_ALIGN_PTR, 0); nfsnodehashtbl = hashinit(desiredvnodes, M_NFSHASH, &nfsnodehash); } @@ -220,7 +221,7 @@ loop: * might cause a bogus v_data pointer to get dereferenced * elsewhere if zalloc should block. */ - np = zalloc(nfsnode_zone); + np = uma_zalloc(nfsnode_zone, M_WAITOK); error = getnewvnode(VT_NFS, mntp, nfsv2_vnodeop_p, &nvp); if (error) { @@ -228,7 +229,7 @@ loop: wakeup(&nfs_node_hash_lock); nfs_node_hash_lock = 0; *npp = 0; - zfree(nfsnode_zone, np); + uma_zfree(nfsnode_zone, np); return (error); } vp = nvp; @@ -246,7 +247,7 @@ loop: if (nfs_node_hash_lock < 0) wakeup(&nfs_node_hash_lock); nfs_node_hash_lock = 0; - zfree(nfsnode_zone, np); + uma_zfree(nfsnode_zone, np); goto retry; } LIST_INSERT_HEAD(nhpp, np, n_hash); @@ -352,7 +353,7 @@ nfs_reclaim(struct vop_reclaim_args *ap) lockdestroy(&np->n_rslock); cache_purge(vp); - zfree(nfsnode_zone, vp->v_data); + uma_zfree(nfsnode_zone, vp->v_data); vp->v_data = (void *)0; return (0); } diff --git a/sys/nfsclient/nfs_subs.c b/sys/nfsclient/nfs_subs.c index c23ecc5..476fe87 100644 --- a/sys/nfsclient/nfs_subs.c +++ b/sys/nfsclient/nfs_subs.c @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm.h> #include <vm/vm_object.h> #include <vm/vm_extern.h> -#include <vm/vm_zone.h> +#include <vm/uma.h> #include <nfs/rpcv2.h> #include <nfs/nfsproto.h> @@ -388,7 +388,8 @@ nfs_init(struct vfsconf *vfsp) { int i; - nfsmount_zone = zinit("NFSMOUNT", sizeof(struct nfsmount), 0, 0, 1); + nfsmount_zone = uma_zcreate("NFSMOUNT", sizeof(struct nfsmount), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); rpc_vers = txdr_unsigned(RPC_VER2); rpc_call = txdr_unsigned(RPC_CALL); rpc_reply = txdr_unsigned(RPC_REPLY); diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index 675cd94..8415661 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include <vm/vm.h> #include <vm/vm_extern.h> -#include <vm/vm_zone.h> +#include <vm/uma.h> #include <net/if.h> #include <net/route.h> @@ -78,7 +78,7 @@ MALLOC_DEFINE(M_NFSBIGFH, "NFSV3 bigfh", "NFS version 3 file handle"); MALLOC_DEFINE(M_NFSDIROFF, "NFSV3 diroff", "NFS directory offset data"); MALLOC_DEFINE(M_NFSHASH, "NFS hash", "NFS hash tables"); -vm_zone_t nfsmount_zone; +uma_zone_t nfsmount_zone; struct nfsstats nfsstats; SYSCTL_NODE(_vfs, OID_AUTO, nfs, CTLFLAG_RW, 0, "NFS filesystem"); @@ -809,7 +809,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, FREE(nam, M_SONAME); return (0); } else { - nmp = zalloc(nfsmount_zone); + nmp = uma_zalloc(nfsmount_zone, M_WAITOK); bzero((caddr_t)nmp, sizeof (struct nfsmount)); TAILQ_INIT(&nmp->nm_bufq); mp->mnt_data = (qaddr_t)nmp; @@ -895,7 +895,7 @@ mountnfs(struct nfs_args *argp, struct mount *mp, struct sockaddr *nam, bad: nfs_disconnect(nmp); crfree(nmp->nm_cred); - zfree(nfsmount_zone, nmp); + uma_zfree(nfsmount_zone, nmp); FREE(nam, M_SONAME); return (error); } @@ -936,7 +936,7 @@ nfs_unmount(struct mount *mp, int mntflags, struct thread *td) FREE(nmp->nm_nam, M_SONAME); crfree(nmp->nm_cred); - zfree(nfsmount_zone, nmp); + uma_zfree(nfsmount_zone, nmp); return (0); } |