diff options
author | kib <kib@FreeBSD.org> | 2014-08-07 03:50:30 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2014-08-07 03:50:30 +0000 |
commit | e6e753558318cbcd315299f33f75e7fc2e23f0f0 (patch) | |
tree | 754b929a977082e7d182c04e016ffa47c347011e /sys/fs/nfsserver | |
parent | 176e58f1da5d94ede76b0c235ef611f0670fba13 (diff) | |
download | FreeBSD-src-e6e753558318cbcd315299f33f75e7fc2e23f0f0.zip FreeBSD-src-e6e753558318cbcd315299f33f75e7fc2e23f0f0.tar.gz |
MFC r269347:
Do not generate 1000 unique lock names for nfsrc hash chain locks.
Shorten the names of some nfs mutexes.
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r-- | sys/fs/nfsserver/nfs_nfsdport.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index cb05dd0..ce0af71 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -3321,23 +3321,16 @@ nfsd_modevent(module_t mod, int type, void *data) goto out; newnfs_portinit(); for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { - snprintf(nfsrchash_table[i].lock_name, - sizeof(nfsrchash_table[i].lock_name), "nfsrc_tcp%d", - i); - mtx_init(&nfsrchash_table[i].mtx, - nfsrchash_table[i].lock_name, NULL, MTX_DEF); - snprintf(nfsrcahash_table[i].lock_name, - sizeof(nfsrcahash_table[i].lock_name), "nfsrc_tcpa%d", - i); - mtx_init(&nfsrcahash_table[i].mtx, - nfsrcahash_table[i].lock_name, NULL, MTX_DEF); + mtx_init(&nfsrchash_table[i].mtx, "nfsrtc", NULL, + MTX_DEF); + mtx_init(&nfsrcahash_table[i].mtx, "nfsrtca", NULL, + MTX_DEF); } - mtx_init(&nfsrc_udpmtx, "nfs_udpcache_mutex", NULL, MTX_DEF); - mtx_init(&nfs_v4root_mutex, "nfs_v4root_mutex", NULL, MTX_DEF); - mtx_init(&nfsv4root_mnt.mnt_mtx, "struct mount mtx", NULL, - MTX_DEF); + mtx_init(&nfsrc_udpmtx, "nfsuc", NULL, MTX_DEF); + mtx_init(&nfs_v4root_mutex, "nfs4rt", NULL, MTX_DEF); + mtx_init(&nfsv4root_mnt.mnt_mtx, "nfs4mnt", NULL, MTX_DEF); for (i = 0; i < NFSSESSIONHASHSIZE; i++) - mtx_init(&nfssessionhash[i].mtx, "nfs_session_mutex", + mtx_init(&nfssessionhash[i].mtx, "nfssm", NULL, MTX_DEF); lockinit(&nfsv4root_mnt.mnt_explock, PVFS, "explock", 0, 0); nfsrvd_initcache(); |