Lines Matching refs:nmp
166 newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp,
240 if (nmp != NULL) {
251 if (nmp != NULL) {
271 if (nmp != NULL) {
272 if ((nmp->nm_flag & NFSMNT_INT))
274 if ((nmp->nm_flag & NFSMNT_RESVPORT))
276 if (NFSHASSOFT(nmp)) {
277 if (nmp->nm_sotype == SOCK_DGRAM)
286 retries = nmp->nm_retry;
289 if (NFSHASNFSV4N(nmp)) {
323 if (nmp != NULL) {
339 timo.tv_sec = nmp->nm_timeo / NFS_HZ;
340 timo.tv_usec = (nmp->nm_timeo % NFS_HZ) * 1000000 / NFS_HZ;
358 if (nmp == NULL || (nmp->nm_flag & NFSMNT_NOCONN) == 0) {
451 struct nfsmount *nmp = nf->nf_mount;
458 if (nf->nf_lastmsg + nmp->nm_tprintf_delay < now) {
459 nfs_down(nmp, nf->nf_td,
480 newnfs_request(struct nfsrv_descript *nd, struct nfsmount *nmp,
505 if (nmp != NULL && (nmp->nm_mountp->mnt_kern_flag & MNTK_UNMOUNTF)) {
519 if (nmp != NULL && td != NULL && NFSHASINT(nmp)) {
530 newnfs_connect(nmp, nrp, cred, td, 0);
533 * For a client side mount, nmp is != NULL and clp == NULL. For
534 * server calls (callbacks or upcalls), nmp == NULL.
548 } else if (nmp != NULL && NFSHASKERB(nmp) &&
550 if (NFSHASALLGSSNAME(nmp) && nmp->nm_krbnamelen > 0)
556 * The system uid is in the nmp->nm_sockreq.nr_cred
559 if (nmp->nm_krbnamelen > 0) {
561 clnt_principal = nmp->nm_krbname;
562 } else if (nmp->nm_uid != (uid_t)-1) {
563 KASSERT(nmp->nm_sockreq.nr_cred != NULL,
566 authcred = crhold(nmp->nm_sockreq.nr_cred);
568 } else if (nmp
569 nmp->nm_uid != (uid_t)-1 && cred->cr_uid == (uid_t)0) {
575 * The system uid is in the nmp->nm_sockreq.nr_cred
578 KASSERT(nmp->nm_sockreq.nr_cred != NULL,
581 authcred = crhold(nmp->nm_sockreq.nr_cred);
583 if (NFSHASINTEGRITY(nmp))
585 else if (NFSHASPRIVACY(nmp))
589 srv_principal = NFSMNT_SRVKRBNAME(nmp);
590 } else if (nmp != NULL && !NFSHASKERB(nmp) &&
600 KASSERT(nmp->nm_sockreq.nr_cred != NULL,
603 authcred = crhold(nmp->nm_sockreq.nr_cred);
606 if (nmp != NULL) {
608 nf.nf_mount = nmp;
611 ((nmp->nm_tprintf_delay)-(nmp->nm_tprintf_initial_delay));
640 if (nmp != NULL) {
651 if (nmp != NULL) {
704 if (nmp == NULL) {
713 if ((nmp->nm_flag & NFSMNT_NFSV4))
718 if (NFSHASSOFT(nmp)) {
723 timeo = nmp->nm_retry * nmp->nm_timeo / 2;
738 rep->r_nmp = nmp;
811 /* If sep == NULL, set it to the default in nmp. */
812 if (sep == NULL && nmp != NULL)
813 sep = NFSMNT_MDSSESSION(nmp);
842 if ((nmp != NULL && i == NFSV4OP_SEQUENCE && j != 0) ||
845 if ((nmp != NULL && i == NFSV4OP_SEQUENCE && j == 0) ||
938 if (nmp != NULL && i == NFSV4OP_PUTFH && j == 0) {
988 if (nmp != NULL && dtrace_nfscl_nfs234_done_probe != NULL) {
1034 newnfs_nmcancelreqs(struct nfsmount *nmp)
1037 if (nmp->nm_sockreq.nr_client != NULL)
1038 CLNT_CLOSE(nmp->nm_sockreq.nr_client);
1140 newnfs_sigintr(struct nfsmount *nmp, struct thread *td)
1146 if (nmp
1148 if (!(nmp->nm_flag & NFSMNT_INT))
1185 nfs_down(struct nfsmount *nmp, struct thread *td, const char *msg,
1188 if (nmp == NULL)
1190 mtx_lock(&nmp->nm_mtx);
1191 if ((flags & NFSSTA_TIMEO) && !(nmp->nm_state & NFSSTA_TIMEO)) {
1192 nmp->nm_state |= NFSSTA_TIMEO;
1193 mtx_unlock(&nmp->nm_mtx);
1194 vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid,
1197 mtx_unlock(&nmp->nm_mtx);
1198 mtx_lock(&nmp->nm_mtx);
1199 if ((flags & NFSSTA_LOCKTIMEO) && !(nmp->nm_state & NFSSTA_LOCKTIMEO)) {
1200 nmp->nm_state |= NFSSTA_LOCKTIMEO;
1201 mtx_unlock(&nmp->nm_mtx);
1202 vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid,
1205 mtx_unlock(&nmp->nm_mtx);
1206 nfs_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, error);
1210 nfs_up(struct nfsmount *nmp, struct thread *td, const char *msg,
1213 if (nmp == NULL)
1216 nfs_msg(td, nmp->nm_mountp->mnt_stat.f_mntfromname, msg, 0);
1219 mtx_lock(&nmp->nm_mtx);
1220 if ((flags & NFSSTA_TIMEO) && (nmp->nm_state & NFSSTA_TIMEO)) {
1221 nmp->nm_state &= ~NFSSTA_TIMEO;
1222 mtx_unlock(&nmp->nm_mtx);
1223 vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid,
1226 mtx_unlock(&nmp->nm_mtx);
1228 mtx_lock(&nmp->nm_mtx);
1229 if ((flags & NFSSTA_LOCKTIMEO) && (nmp->nm_state & NFSSTA_LOCKTIMEO)) {
1230 nmp->nm_state &= ~NFSSTA_LOCKTIMEO;
1231 mtx_unlock(&nmp->nm_mtx);
1232 vfs_event_signal(&nmp->nm_mountp->mnt_stat.f_fsid,
1235 mtx_unlock(&nmp->nm_mtx);