PERFORCE change 61016 for review

Julian Elischer julian at FreeBSD.org
Sat Sep 4 18:06:37 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=61016

Change 61016 by julian at julian_ref on 2004/09/05 01:06:33

	 IFC at 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 <sys/param.h>
@@ -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 <sys/param.h>
@@ -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)


More information about the p4-projects mailing list