From owner-svn-src-all@FreeBSD.ORG Fri Feb 11 11:01:03 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2797A106564A; Fri, 11 Feb 2011 11:01:03 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB2B8FC0A; Fri, 11 Feb 2011 11:01:02 +0000 (UTC) Received: from c122-107-114-89.carlnfd1.nsw.optusnet.com.au (c122-107-114-89.carlnfd1.nsw.optusnet.com.au [122.107.114.89]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p1BB0wfn022092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Feb 2011 22:00:59 +1100 Date: Fri, 11 Feb 2011 22:00:58 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Doug Barton In-Reply-To: <4D54CE80.3060305@FreeBSD.org> Message-ID: <20110211203239.I966@besplex.bde.org> References: <201101260506.p0Q56Bhf064034@svn.freebsd.org> <20110126173411.P972@besplex.bde.org> <4D408463.4000001@FreeBSD.org> <20110127153956.J1436@besplex.bde.org> <4D41D52D.2080906@FreeBSD.org> <20110128194615.G1167@besplex.bde.org> <4D54CE80.3060305@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Bruce Evans Subject: Re: svn commit: r217871 - head/sbin/mount X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2011 11:01:03 -0000 On Thu, 10 Feb 2011, Doug Barton wrote: > On 01/28/2011 01:06, Bruce Evans wrote: >> The solaris server behaviour can't happen, except accidentally due to >> races :-). Since the FreeBSD client doesn't support the noatime flag >> except to ignore it, it can't tell any server about it. > > I don't mean to be a pest, but I'm confused as to why I observed what I > observed if this is the case. I tested it a couple of times each way, so I'm > confident that I saw a difference with and without noatime when mounting a > solaris server. I see no evidence of this. You at least need to run a simple test like the following: %%% #include #include #include #include #include #include int main(void) { struct stat sb; time_t now, then; int fd; char buf[1]; fd = open("foo", O_RDWR | O_CREAT | O_TRUNC, 0666); assert(fd >= 0); assert(write(fd, "", 1) == 1); assert(fsync(fd) == 0); assert(fstat(fd, &sb) == 0); then = sb.st_atime; for (;;) { assert(lseek(fd, (off_t)0, SEEK_SET) == 0); sleep(1); /* increase if fs resolution is low or buggy */ assert(read(fd, buf, 1) == 1); assert(fstat(fd, &sb) == 0); now = sb.st_atime; printf("now = %jd; then = %jd\n", (intmax_t)now, (intmax_t)then); #if 0 assert(now >= then + 1); #else if (!(now >= then + 1)) printf("assert(now >= then + 1) would fail\n"); #endif fflush(stdout); then = now; } } %%% and, if this works, report the surprising nfs RPCs that make it work. It didn't work with FreeBSD clients and servers of course. There were only GetAttr RPCs for the fstat()s, and no Read RPCs at all. Bruce