From owner-freebsd-fs Wed Apr 17 13:31:23 2002 Delivered-To: freebsd-fs@freebsd.org Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by hub.freebsd.org (Postfix) with ESMTP id A3E3E37B41A; Wed, 17 Apr 2002 13:31:19 -0700 (PDT) Received: by elvis.mu.org (Postfix, from userid 1192) id 87D06AE162; Wed, 17 Apr 2002 13:31:19 -0700 (PDT) Date: Wed, 17 Apr 2002 13:31:19 -0700 From: Alfred Perlstein To: fs@freebsd.org Cc: mckusick@freebsd.org Subject: "notime fix" (forw) what do you think of this? Message-ID: <20020417203119.GA90826@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.27i Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org it's a hack to make ufs_vnops update atime if it is going to update mtime or ctime. I think this sort of makes sense, it allows one to run noatime to get good speed without the filesystem getting all "wonky" because access times aren't updated when they should be. ----- Forwarded message from Nick Johnson ----- From: Nick Johnson To: al Subject: what do you think of this? Date: Wed, 17 Apr 2002 13:05:08 -0700 (PDT) Message-ID: --- ufs_vnops.c.orig Wed Apr 17 12:55:37 2002 +++ ufs_vnops.c Wed Apr 17 13:00:58 2002 @@ -162,6 +162,17 @@ ip->i_flag |= IN_LAZYMOD; else ip->i_flag |= IN_MODIFIED; + /* + * If we're going to be updating or changing, + * it makes sense that we're accessing as well. + * This changes the traditional semantics of + * mount -o noatime slightly. + */ + if (!(ip->i_flag & IN_ACCESS) && + ((ip->i_flag & IN_UPDATE) || + (ip->i_flag & IN_CHANGE))) { + ip->i_flag |= IN_ACCESS; + } if (ip->i_flag & IN_ACCESS) { ip->i_atime = ts.tv_sec; ip->i_atimensec = ts.tv_nsec; -- "The aptly-named morons.org is an obscenity-laced screed..." -- Robert P. Lockwood, Catholic League director of research Nick Johnson, version 2.0 http://www.spatula.net/ ----- End forwarded message ----- -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message