Lines Matching refs:nfsd

710 		 * to keep the socket from being closed when nfsd closes its
846 * nfsd theory of operation:
848 * The first nfsd thread stays in user mode accepting new TCP connections
849 * which are then added via the "addsock" call. The rest of the nfsd threads
853 * There's a list of nfsd threads (nfsd_head).
854 * There's an nfsd queue that contains only those nfsds that are
865 * wake up a waiting nfsd (if there is one).
872 * When an nfsd starts working on a socket, it removes it from the head of
883 struct nfsd *nfsd;
897 MALLOC(nfsd, struct nfsd *, sizeof(struct nfsd), M_NFSD, M_WAITOK);
898 if (!nfsd)
900 bzero(nfsd, sizeof(struct nfsd));
905 TAILQ_INSERT_TAIL(&nfsd_head, nfsd, nfsd_chain);
910 /* Set time out so that nfsd threads can wake up a see if they are still needed. */
921 slp = nfsd->nfsd_slp;
922 } else if (nfsd->nfsd_flag & NFSD_REQINPROG) {
925 slp = nfsd->nfsd_slp;
930 while (!nfsd->nfsd_slp && TAILQ_EMPTY(&nfsrv_sockwait) && TAILQ_EMPTY(&nfsrv_sockwork)) {
934 * nfsd threads than configured, let's exit.
939 nfsd->nfsd_flag |= NFSD_WAITING;
940 TAILQ_INSERT_HEAD(&nfsd_queue, nfsd, nfsd_queue);
941 error = msleep(nfsd, nfsd_mutex, PSOCK | PCATCH, "nfsd", &to);
943 if (nfsd->nfsd_flag & NFSD_WAITING) {
944 TAILQ_REMOVE(&nfsd_queue, nfsd, nfsd_queue);
945 nfsd->nfsd_flag &= ~NFSD_WAITING;
952 slp = nfsd->nfsd_slp;
979 if (!nfsd->nfsd_slp && slp) {
982 nfsd->nfsd_slp = slp;
1000 error = nfsrv_dorec(slp, nfsd, &nd);
1017 nfsd->nfsd_flag |= NFSD_REQINPROG;
1033 nfsd->nfsd_slp = NULL;
1034 nfsd->nfsd_flag &= ~NFSD_REQINPROG;
1144 panic("nfsd setrcvif failed: %d", error);
1223 error = nfsrv_dorec(slp, nfsd, &nd);
1232 nfsd->nfsd_flag &= ~NFSD_REQINPROG;
1233 nfsd->nfsd_slp = NULL;
1239 TAILQ_REMOVE(&nfsd_head, nfsd, nfsd_chain);
1240 FREE(nfsd, M_NFSD);