Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jan 2001 14:40:40 -0800 (PST)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Marc Culler <culler@math.uic.edu>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: Bug in NFSv3 client
Message-ID:  <200101032240.f03MeeQ51401@earth.backplane.com>
References:   <20010103155533.B71238@math.uic.edu>

next in thread | previous in thread | raw e-mail | index | archive | help

: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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101032240.f03MeeQ51401>