From: Trond Myklebust Subject: Re: mtime not updated in client cache? Date: Wed, 07 Dec 2005 22:38:02 -0500 Message-ID: <1134013082.8002.8.camel@lade.trondhjem.org> References: <438B9C44.4030305@google.com> <1133225130.12178.9.camel@lade.trondhjem.org> <438E4CA7.2050405@google.com> <1133399727.8267.11.camel@lade.trondhjem.org> <43978AD2.8020000@google.com> Mime-Version: 1.0 Content-Type: text/plain Cc: nfs@lists.sourceforge.net Return-path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.91] helo=mail.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 4.30) id 1EkCc2-0008K3-DJ for nfs@lists.sourceforge.net; Wed, 07 Dec 2005 19:38:30 -0800 Received: from pat.uio.no ([129.240.130.16] ident=7411) by mail.sourceforge.net with esmtps (TLSv1:AES256-SHA:256) (Exim 4.44) id 1EkCc0-0006Fw-Ur for nfs@lists.sourceforge.net; Wed, 07 Dec 2005 19:38:30 -0800 To: Vince Busam In-Reply-To: <43978AD2.8020000@google.com> Sender: nfs-admin@lists.sourceforge.net Errors-To: nfs-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: Discussion of NFS under Linux development, interoperability, and testing. List-Post: List-Help: List-Subscribe: , List-Archive: On Wed, 2005-12-07 at 17:22 -0800, Vince Busam wrote: > I tried 2.6.15-rc5 (withoug NFS_ALL and CITI_ALL), and it exhibits the same issue as > demonstrated by the above referenced code. Yep. Your code contains a wrong assumption: fflush() is not guaranteed to immediately update mtime/ctime since it does not sync data to disk. The same is true of the posix "write()" function. If you add the line fsync(fileno(fp)) after the call to fflush(), then the mtime will be correctly updated. Cheers, Trond ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ NFS maillist - NFS@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs