Subject: kern/26156: atime not updated on NFS server
To: None <gnats-bugs@gnats.NetBSD.org>
From: Manuel Bouyer <bouyer@antioche.eu.org>
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
>Closed-Date:
>Last-Modified:
>Originator:     Manuel Bouyer
>Release:        NetBSD 2.0_BETA, sources of Jul, 3
>Organization:
>Environment:
System: NetBSD chassiron.antioche.eu.org 2.0_BETA NetBSD 2.0_BETA (CHASSIRON) #0: Sat Jul 3 19:31:18 CEST 2004 bouyer@pop.lip6.fr:/local/pop1/bouyer/tmp/sparc/obj/local/pop1/bouyer/netbsd-2-0/src/sys/arch/sparc/compile/CHASSIRON sparc
Architecture: sparc
Machine: sparc
>Description:
	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.
>How-To-Repeat:
	
#include <stdio.h>
#include <sys/stat.h>

main()
{
	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);
		sleep(10);
	}
}
	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.
	
>Fix:
	unknown
>Release-Note:
>Audit-Trail:
>Unformatted: