diff options
author | kib <kib@FreeBSD.org> | 2016-08-26 10:04:10 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2016-08-26 10:04:10 +0000 |
commit | 5eaf5813abcaf71c35e1006aab0a861cd104f3aa (patch) | |
tree | bca93d9d17af3deb43eea20809b800e90e4e9643 /sys/nfs | |
parent | e78ab6e5643ca053c8b55a26b13329fb1d4afd3e (diff) | |
download | FreeBSD-src-5eaf5813abcaf71c35e1006aab0a861cd104f3aa.zip FreeBSD-src-5eaf5813abcaf71c35e1006aab0a861cd104f3aa.tar.gz |
MFC r303382:
Provide the getboottime(9) and getboottimebin(9) KPI.
MFC r303387:
Prevent parallel tc_windup() calls. Keep boottime in timehands,
and adjust it from tc_windup().
MFC notes:
The boottime and boottimebin globals are still exported from
the kernel dyn symbol table in stable/11, but their declarations are
removed from sys/time.h. This preserves KBI but not KPI, while all
in-tree consumers are converted to getboottime().
The variables are updated after tc_setclock_mtx is dropped, which gives
approximately same unlocked bugs as before.
The boottime and boottimebin locals in several sys/kern_tc.c functions
were renamed by adding the '_x' suffix to avoid name conficts.
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_lock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfs/nfs_lock.c b/sys/nfs/nfs_lock.c index 7d11672..c84413e 100644 --- a/sys/nfs/nfs_lock.c +++ b/sys/nfs/nfs_lock.c @@ -241,6 +241,7 @@ nfs_dolock(struct vop_advlock_args *ap) struct flock *fl; struct proc *p; struct nfsmount *nmp; + struct timeval boottime; td = curthread; p = td->td_proc; @@ -284,6 +285,7 @@ nfs_dolock(struct vop_advlock_args *ap) p->p_nlminfo = malloc(sizeof(struct nlminfo), M_NLMINFO, M_WAITOK | M_ZERO); p->p_nlminfo->pid_start = p->p_stats->p_start; + getboottime(&boottime); timevaladd(&p->p_nlminfo->pid_start, &boottime); } msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start; |