From owner-freebsd-fs@FreeBSD.ORG Sat Dec 27 14:28:39 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFE8CA9D; Sat, 27 Dec 2014 14:28:39 +0000 (UTC) Received: from esa-annu.net.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 5CD456662B; Sat, 27 Dec 2014 14:28:38 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtYEAJDBnlSDaFve/2dsb2JhbABbhDSDAccEglACgR0BAQEBAX2EEyMEgRYZAgRVBgGIPrQtlQoBAQEBAQUBAQEBAQEBARqPQxkigmiBQQWJS4YViDWNCoM5IoQMIIF2fgEBAQ X-IronPort-AV: E=Sophos;i="5.07,651,1413259200"; d="scan'208";a="181380897" Received: from muskoka.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.222]) by esa-annu.net.uoguelph.ca with ESMTP; 27 Dec 2014 09:28:16 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 1E833AEA36; Sat, 27 Dec 2014 09:28:16 -0500 (EST) Date: Sat, 27 Dec 2014 09:28:16 -0500 (EST) From: Rick Macklem To: FreeBSD Filesystems , John Baldwin , Konstantin Belousov Message-ID: <1190766207.2826601.1419690496079.JavaMail.root@uoguelph.ca> In-Reply-To: <1894262154.2825656.1419690232046.JavaMail.root@uoguelph.ca> Subject: RFC: new NFS mount option or restore old behaviour for Solaris server bug? MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_2826599_1031187847.1419690496077" X-Originating-IP: [172.17.95.12] X-Mailer: Zimbra 7.2.6_GA_2926 (ZimbraWebClient - FF3.0 (Win)/7.2.6_GA_2926) 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: Sat, 27 Dec 2014 14:28:40 -0000 ------=_Part_2826599_1031187847.1419690496077 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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? Thanks in advance for your comments, rick ps: The trivial patch for #2 is attached, in case you are interested. ------=_Part_2826599_1031187847.1419690496077 Content-Type: text/x-patch; name=setservertime.patch Content-Disposition: attachment; filename=setservertime.patch Content-Transfer-Encoding: base64 LS0tIGZzL25mc2NsaWVudC9uZnNfY2xwb3J0LmMuc2F2CTIwMTQtMTItMjUgMTI6NTQ6MjUuMDAw MDAwMDAwIC0wNTAwCisrKyBmcy9uZnNjbGllbnQvbmZzX2NscG9ydC5jCTIwMTQtMTItMjUgMTI6 NTU6NDkuMDAwMDAwMDAwIC0wNTAwCkBAIC0xMDk2LDkgKzEwOTYsMTYgQEAgbmZzY2xfY2hlY2tz YXR0cihzdHJ1Y3QgdmF0dHIgKnZhcCwgc3RydQogCSAqIHVzIHR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