From owner-svn-src-head@FreeBSD.ORG Mon Feb 23 15:34:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0DD81065672; Mon, 23 Feb 2009 15:34:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9F78FC18; Mon, 23 Feb 2009 15:34:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (pool-98-109-39-197.nwrknj.fios.verizon.net [98.109.39.197]) by cyrus.watson.org (Postfix) with ESMTPSA id 189C746B51; Mon, 23 Feb 2009 10:34:20 -0500 (EST) Received: from localhost (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id n1NFY2kq016392; Mon, 23 Feb 2009 10:34:14 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Robert Watson Date: Mon, 23 Feb 2009 10:02:58 -0500 User-Agent: KMail/1.9.7 References: <200902192210.n1JMAddn009074@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902231002.59036.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 23 Feb 2009 10:34:14 -0500 (EST) X-Virus-Scanned: ClamAV 0.94.2/9031/Mon Feb 23 08:19:18 2009 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r188831 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 15:34:21 -0000 On Saturday 21 February 2009 3:47:50 am Robert Watson wrote: > On Thu, 19 Feb 2009, John Baldwin wrote: > > > Author: jhb > > Date: Thu Feb 19 22:10:39 2009 > > New Revision: 188831 > > URL: http://svn.freebsd.org/changeset/base/188831 > > > > Log: > > Don't clear the attribute cache of a file when it is closed. A subsequent > > open() of the same file will load fresh attributes, so they do not need to > > be explicitly flushed in close() to guarantee close to open consistency. > > However, other file desciptors may still reference this file and clearing > > the attributes in close() forces those other file descriptors to fetch > > fresh attributes the next time they need them. > > (hand wave) Not an area of expertise for me, but I was under the loose > impression that one of the reasons for this refresh was to pull in new > timestamps, etc so that applications using file attributes to track > modification time, size, etc definitely saw the right thing reflecting the > server interpretation of all the pending writes having been flushed back on > close(). (more hand waving) I believe that a client always sees updates it performs, so it will always see any updates that result from a write() call that happens before the close(). The only attribute updates that would not now be seen in between a close() and open() are updates made by another client. However, this is "normal" for NFS and matches what happens while a file is opened. What close-to-open requires is that the client have "fresh" attributes when open() is called. It does not make any guarantees about attributes after a close() and before an open(). -- John Baldwin