From owner-freebsd-hackers Wed Jul 25 14:38:35 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from root.com (root.com [209.102.106.178]) by hub.freebsd.org (Postfix) with ESMTP id 2968437B401 for ; Wed, 25 Jul 2001 14:38:32 -0700 (PDT) (envelope-from dg@root.com) Received: (from dg@localhost) by root.com (8.11.2/8.11.2) id f6PLPJb24505; Wed, 25 Jul 2001 14:25:19 -0700 (PDT) (envelope-from dg) Date: Wed, 25 Jul 2001 14:25:19 -0700 From: David Greenman To: "David E. Cross" Cc: Ronald G Minnich , freebsd-hackers@FreeBSD.ORG Subject: Re: exec() doesn't update access time Message-ID: <20010725142519.D14981@nexus.root.com> References: <200107252013.QAA00335@cs.rpi.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200107252013.QAA00335@cs.rpi.edu>; from crossd@cs.rpi.edu on Wed, Jul 25, 2001 at 04:13:37PM -0400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Hmm... would it be as easy as >VOP_GETATTR(); >. >. >. >VOP_SETATTR(); > >within the exec() code? > >Certainly this would be an 'easy' fix (and I can work up diffs for review), >but is it the 'correct' fix? No, it's not the correct fix. You shouldn't need to do the GETATTR first, and doing a SETATTR will cause a synchronous update of the atime, which is not what you want. This also doesn't fix that standard case of open/mmap() not updating the access time, which is the real problem, not execve. Guessing, I think the correct fix is probably to set the IN_ACCESS flag in ufs_open() [and similarly with other filesystems where this makes sense] if the filesystem is not mounted with the noatime flag. However, I'm not sure of the symantics of the access time in the relavent standards, and I seem to recall Bruce saying that it was incorrect to indicate an access on just an open(), but I may be mistaken. -DG David Greenman Co-founder, The FreeBSD Project - http://www.freebsd.org President, TeraSolutions, Inc. - http://www.terasolutions.com Pave the road of life with opportunities. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message