From owner-p4-projects@FreeBSD.ORG Sun Sep 5 01:06:36 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 752B516A4D0; Sun, 5 Sep 2004 01:06:36 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4964816A4CE for ; Sun, 5 Sep 2004 01:06:36 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 32EF243D48 for ; Sun, 5 Sep 2004 01:06:36 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i8516afr006340 for ; Sun, 5 Sep 2004 01:06:36 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i8516Zgw006337 for perforce@freebsd.org; Sun, 5 Sep 2004 01:06:35 GMT (envelope-from julian@freebsd.org) Date: Sun, 5 Sep 2004 01:06:35 GMT Message-Id: <200409050106.i8516Zgw006337@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 61016 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2004 01:06:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=61016 Change 61016 by julian@julian_ref on 2004/09/05 01:06:33 IFC@61015 Affected files ... .. //depot/projects/nsched/sys/fs/autofs/autofs.h#2 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_util.c#3 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#5 integrate Differences ... ==== //depot/projects/nsched/sys/fs/autofs/autofs.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/autofs/autofs.h,v 1.1 2004/08/31 16:26:00 alfred Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs.h,v 1.2 2004/09/04 18:09:47 alfred Exp $ * $Id: autofs.h,v 1.20 2004/08/31 08:49:56 bright Exp $ */ #ifndef __AUTOFS_H__ @@ -332,10 +332,10 @@ int a_ref; /* refcount */ uid_t a_uid; gid_t a_gid; - struct timeval a_birthtime; - struct timeval a_atime; - struct timeval a_mtime; - struct timeval a_ctime; + struct timespec a_birthtime; + struct timespec a_atime; + struct timespec a_mtime; + struct timespec a_ctime; unsigned long a_sysflags; /* sys flags: IMMUTABLE, APPEND, etc. */ union { struct autofs_dir_node d; @@ -410,8 +410,8 @@ int autofs_request(struct vnode *dp, struct vnode *vp, thread_t *td, const char *nameptr, size_t namelen, enum autoreqop op, void **pp, size_t *plen, off_t off, int *eofp); -int autofs_update(struct vnode *vp, struct timeval *access, - struct timeval *modify, int waitfor); +int autofs_update(struct vnode *vp, struct timespec *access, + struct timespec *modify, int waitfor); int autofs_suser(thread_t *td, struct ucred *cred, int flag); #ifdef FREEBSD_4 ==== //depot/projects/nsched/sys/fs/autofs/autofs_util.c#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/autofs/autofs_util.c,v 1.2 2004/09/02 20:44:55 alfred Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs_util.c,v 1.3 2004/09/04 18:09:47 alfred Exp $ * $Id: autofs_util.c,v 1.19 2004/08/31 08:49:56 bright Exp $ */ #include @@ -249,7 +249,7 @@ int error; struct autofsnode *an, *parent_an; struct vnode *vp; - struct timeval now; + struct timespec now; char *nodename; size_t nodenamelen; struct autofsmount *amp = VFSTOAFS(mp); @@ -300,7 +300,7 @@ an->a_ino = ino; - getmicrotime(&now); + getnanotime(&now); an->a_birthtime = now; an->a_atime = now; an->a_mtime = now; ==== //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#5 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/autofs/autofs_vnops.c,v 1.4 2004/09/03 16:05:44 des Exp $ + * $FreeBSD: src/sys/fs/autofs/autofs_vnops.c,v 1.6 2004/09/04 18:10:56 alfred Exp $ * $Id: autofs_vnops.c,v 1.21 2004/08/31 08:49:56 bright Exp $ */ #include @@ -168,11 +168,13 @@ } vap->va_blocksize = 512; vap->va_atime.tv_sec = an->a_atime.tv_sec; - vap->va_atime.tv_nsec = an->a_atime.tv_usec * 1000; + vap->va_atime.tv_nsec = an->a_atime.tv_nsec; vap->va_mtime.tv_sec = an->a_mtime.tv_sec; - vap->va_mtime.tv_nsec = an->a_mtime.tv_usec * 1000; + vap->va_mtime.tv_nsec = an->a_mtime.tv_nsec; vap->va_ctime.tv_sec = an->a_ctime.tv_sec; - vap->va_ctime.tv_nsec = an->a_ctime.tv_usec * 1000; + vap->va_ctime.tv_nsec = an->a_ctime.tv_nsec; + vap->va_birthtime.tv_sec = an->a_birthtime.tv_sec; + vap->va_birthtime.tv_nsec = an->a_birthtime.tv_nsec; vap->va_gen = an->a_gen; vap->va_flags = an->a_sysflags; vap->va_bytes = vap->va_blocksize * @@ -306,7 +308,7 @@ struct vattr *vap = ap->a_vap; struct ucred *cred = ap->a_cred; thread_t *td = AP_THREAD(ap); - struct timeval atimeval, mtimeval; + struct timespec atimespec, mtimespec; int error; /* @@ -397,11 +399,11 @@ an->a_nodeflags |= IN_ACCESS; if (vap->va_mtime.tv_sec != VNOVAL) an->a_nodeflags |= IN_CHANGE | IN_UPDATE; - atimeval.tv_sec = vap->va_atime.tv_sec; - atimeval.tv_usec = vap->va_atime.tv_nsec / 1000; - mtimeval.tv_sec = vap->va_mtime.tv_sec; - mtimeval.tv_usec = vap->va_mtime.tv_nsec / 1000; - error = autofs_update(vp, &atimeval, &mtimeval, 0); + atimespec.tv_sec = vap->va_atime.tv_sec; + atimespec.tv_nsec = vap->va_atime.tv_nsec; + mtimespec.tv_sec = vap->va_mtime.tv_sec; + mtimespec.tv_nsec = vap->va_mtime.tv_nsec; + error = autofs_update(vp, &atimespec, &mtimespec, 0); if (error) goto out; } @@ -1208,14 +1210,14 @@ int autofs_update(vp, access, modify, waitfor) struct vnode *vp; - struct timeval *access; - struct timeval *modify; + struct timespec *access; + struct timespec *modify; int waitfor; { struct autofsnode *an = VTOA(vp); - struct timeval now; + struct timespec now; - getmicrotime(&now); + getnanotime(&now); if (access == NULL) access = &now; if (modify == NULL)