Subject: kern/26156: atime not updated on NFS server
To: None <>
From: Manuel Bouyer <>
List: netbsd-bugs
Date: 07/03/2004 23:36:58
>Number:         26156
>Category:       kern
>Synopsis:       atime not updated on NFS server
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 03 21:38:00 UTC 2004
>Originator:     Manuel Bouyer
>Release:        NetBSD 2.0_BETA, sources of Jul, 3
System: NetBSD 2.0_BETA NetBSD 2.0_BETA (CHASSIRON) #0: Sat Jul 3 19:31:18 CEST 2004 sparc
Architecture: sparc
Machine: sparc
	When a NFS client access a file on a 2.0 NFS server (e.g.
	cat file > /dev/null), the server doesn't update the atime of the file.
	touch(1) does update the atime.
	The atime is updated as expected when tested against a 1.6.2 NFS server.
#include <stdio.h>
#include <sys/stat.h>

	struct stat st;

	while (1) {
		stat("file.test", &st);
		printf("size %ld atime %ld mtime %ld\n", (u_long)st.st_size, (u_long)st.st_atime, (u_long)st.st_mtime);
	run the above program on the server in the appropriate directory.
	(you can also run it on the client, it'll give the same results).
	On the client, do 'cat file.test' > /dev/null', notice that the
	atime isn't updated.