From owner-freebsd-stable Wed Jan 3 14:41:26 2001 From owner-freebsd-stable@FreeBSD.ORG Wed Jan 3 14:41:24 2001 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from earth.backplane.com (placeholder-dcat-1076843399.broadbandoffice.net [64.47.83.135]) by hub.freebsd.org (Postfix) with ESMTP id 88FFC37B400 for ; Wed, 3 Jan 2001 14:41:24 -0800 (PST) Received: (from dillon@localhost) by earth.backplane.com (8.11.1/8.9.3) id f03MeeQ51401; Wed, 3 Jan 2001 14:40:40 -0800 (PST) (envelope-from dillon) Date: Wed, 3 Jan 2001 14:40:40 -0800 (PST) From: Matt Dillon Message-Id: <200101032240.f03MeeQ51401@earth.backplane.com> To: Marc Culler Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Bug in NFSv3 client References: <20010103155533.B71238@math.uic.edu> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :Dear FreeBSD folks: : :There is a bug in the NFS version 3 client which results in a bad time :stamp when a file is created with the O_EXCL flag. : :A test program which produces the bug is at the end of the file. (It :is actually the same program which was used to illustrate a different :bug in the NFSv3 server in December 1999.) : :We are running a FreeBSD NFS server with Solaris, FreeBSD and Linux :clients. The bad time stamps seem to be created by the FreeBSD :clients, although only the Solaris clients complain about it. The :others apparently ignore it. : :The test program creates two files, one with the O_EXCL flag set and :one without. Then it prints out the access time, modification time, :and status change time of the two files. PLEASE NOTE THE ACCESS TIMES! :... Hmm. On the face of it, looking at the code, it appears that the NFSV3CREATE_EXCLUSIVE generation code is generating two create_verf RPC elements instead of one, causing the timestamp that occurs later to be at the wrong offset. See line 1399 if /usr/src/sys/nfs/nfs_vnops.c #ifdef INET if (!TAILQ_EMPTY(&in_ifaddrhead)) *tl++ = IA_SIN(in_ifaddrhead.tqh_first)->sin_add r.s_addr; else #endif *tl++ = create_verf; <<<<<<<<<<<<<< this guy *tl = ++create_verf; I have not tested this idea at all, but please try removing the indicated line above, recompile the FreeBSD client's kernel, and tell me if that solves your problem. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message