Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfs/nfs_commonsubs.c
Show First 20 Lines • Show All 3,618 Lines • ▼ Show 20 Lines | case AF_INET6: | ||||
ad6->sin6_port = nargs->nuserd_port; | ad6->sin6_port = nargs->nuserd_port; | ||||
break; | break; | ||||
#endif | #endif | ||||
default: | default: | ||||
error = ENXIO; | error = ENXIO; | ||||
} | } | ||||
rp->nr_vers = RPCNFSUSERD_VERS; | rp->nr_vers = RPCNFSUSERD_VERS; | ||||
if (error == 0) | if (error == 0) | ||||
error = newnfs_connect(NULL, rp, NFSPROCCRED(p), p, 0, false); | error = newnfs_connect(NULL, rp, NFSPROCCRED(p), p, 0, false, | ||||
&rp->nr_client); | |||||
if (error == 0) { | if (error == 0) { | ||||
NFSLOCKNAMEID(); | NFSLOCKNAMEID(); | ||||
nfsrv_nfsuserd = RUNNING; | nfsrv_nfsuserd = RUNNING; | ||||
NFSUNLOCKNAMEID(); | NFSUNLOCKNAMEID(); | ||||
} else { | } else { | ||||
free(rp->nr_nam, M_SONAME); | free(rp->nr_nam, M_SONAME); | ||||
NFSLOCKNAMEID(); | NFSLOCKNAMEID(); | ||||
nfsrv_nfsuserd = NOTRUNNING; | nfsrv_nfsuserd = NOTRUNNING; | ||||
Show All 17 Lines | if (nfsrv_nfsuserd != RUNNING) { | ||||
return; | return; | ||||
} | } | ||||
nfsrv_nfsuserd = STARTSTOP; | nfsrv_nfsuserd = STARTSTOP; | ||||
/* Wait for all upcalls to complete. */ | /* Wait for all upcalls to complete. */ | ||||
while (nfsrv_userdupcalls > 0) | while (nfsrv_userdupcalls > 0) | ||||
msleep(&nfsrv_userdupcalls, NFSNAMEIDMUTEXPTR, PVFS, | msleep(&nfsrv_userdupcalls, NFSNAMEIDMUTEXPTR, PVFS, | ||||
"nfsupcalls", 0); | "nfsupcalls", 0); | ||||
NFSUNLOCKNAMEID(); | NFSUNLOCKNAMEID(); | ||||
newnfs_disconnect(&nfsrv_nfsuserdsock); | newnfs_disconnect(NULL, &nfsrv_nfsuserdsock); | ||||
free(nfsrv_nfsuserdsock.nr_nam, M_SONAME); | free(nfsrv_nfsuserdsock.nr_nam, M_SONAME); | ||||
NFSLOCKNAMEID(); | NFSLOCKNAMEID(); | ||||
nfsrv_nfsuserd = NOTRUNNING; | nfsrv_nfsuserd = NOTRUNNING; | ||||
NFSUNLOCKNAMEID(); | NFSUNLOCKNAMEID(); | ||||
} | } | ||||
/* | /* | ||||
* Do upcalls to the nfsuserd, for cache misses of the owner/ownergroup | * Do upcalls to the nfsuserd, for cache misses of the owner/ownergroup | ||||
▲ Show 20 Lines • Show All 1,260 Lines • Show Last 20 Lines |