Deleted Added
full compact
35c35
< __FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 217335 2011-01-12 23:34:09Z zack $");
---
> __FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 217432 2011-01-14 23:30:35Z rmacklem $");
60a61,64
> struct proc *nfsd_master_proc = NULL;
> static pid_t nfsd_master_pid = (pid_t)-1;
> static char nfsd_master_comm[MAXCOMLEN + 1];
> static struct timeval nfsd_master_start;
2907a2912
> struct proc *procp;
2977a2983,2990
> } else if (uap->flag & NFSSVC_BACKUPSTABLE) {
> procp = p->td_proc;
> PROC_LOCK(procp);
> nfsd_master_pid = procp->p_pid;
> bcopy(procp->p_comm, nfsd_master_comm, MAXCOMLEN + 1);
> nfsd_master_start = procp->p_stats->p_start;
> nfsd_master_proc = procp;
> PROC_UNLOCK(procp);
3032a3046,3071
> /*
> * Signal the userland master nfsd to backup the stable restart file.
> */
> void
> nfsrv_backupstable(void)
> {
> struct proc *procp;
>
> if (nfsd_master_proc != NULL) {
> procp = pfind(nfsd_master_pid);
> /* Try to make sure it is the correct process. */
> if (procp == nfsd_master_proc &&
> procp->p_stats->p_start.tv_sec ==
> nfsd_master_start.tv_sec &&
> procp->p_stats->p_start.tv_usec ==
> nfsd_master_start.tv_usec &&
> strcmp(procp->p_comm, nfsd_master_comm) == 0)
> psignal(procp, SIGUSR2);
> else
> nfsd_master_proc = NULL;
>
> if (procp != NULL)
> PROC_UNLOCK(procp);
> }
> }
>