From owner-freebsd-fs@FreeBSD.ORG Sun Dec 28 16:19:29 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E9BC1E3; Sun, 28 Dec 2014 16:19:29 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB43E647D1; Sun, 28 Dec 2014 16:19:28 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 930B5B924; Sun, 28 Dec 2014 11:19:27 -0500 (EST) From: John Baldwin To: Rick Macklem Subject: Re: RFC: new NFS mount option or restore old behaviour for Solaris server bug? Date: Sun, 28 Dec 2014 11:19:14 -0500 Message-ID: <3494907.XSdoyu9NPX@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <1190766207.2826601.1419690496079.JavaMail.root@uoguelph.ca> References: <1190766207.2826601.1419690496079.JavaMail.root@uoguelph.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Sun, 28 Dec 2014 11:19:27 -0500 (EST) Cc: FreeBSD Filesystems , Konstantin Belousov X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Dec 2014 16:19:29 -0000 On Saturday, December 27, 2014 09:28:16 AM Rick Macklem wrote: > Hi, > > The FreeBSD9.1 and earlier NFS clients almost always (unless the > tod clock ticked to next second while the operation was in progress) > set the mtime to the server's time (xx_TOSERVER) for exclusive open. > Starting with FreeBSD9.2, the mtime would be set to the client's time > due to r245508, which fixed the code for utimes() to use VA_UTIMES_NULL. > > This change tickled a bug in recent Solaris servers, which return > NFS_OK to the Setattr RPC but don't actually set the file's mode bits. > (The bug isn't tickled when mtime is set to the server's time.) > I have patches to work around this in two ways: > 1 - Add a new "useservertime" mount option that forces xx_TOSERVER. > (This patch would force xx_TOSERVER for exclusive open.) > It permits the man page to document why it is needed-->broken Solaris servers. > 2 - Use xx_TOSERVER for exclusive open always. Since this was the normal > behaviour until FreeBSD9.2, I don't think this would cause problems or > be a POLA violation, but I can't be sure? > > I am leaning towards #2, since it avoids yet another mount option. > However, I'd like other people's opinions on which option is better, > or any other suggestions? Definitely prefer #2. In general I think we want to use TOSERVER timestamps aside from an explicit call to utimes() with a non-NULL argument (i.e. if userland wants to force a specific timestamp). I think any implicit timestamps should be TOSERVER. -- John Baldwin