From owner-freebsd-current@FreeBSD.ORG Wed Nov 17 19:07:24 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F34416A525 for ; Wed, 17 Nov 2004 19:07:23 +0000 (GMT) Received: from out003.verizon.net (out003pub.verizon.net [206.46.170.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id E261443D48 for ; Wed, 17 Nov 2004 19:07:22 +0000 (GMT) (envelope-from Mikhail.Teterin@murex.com) Received: from corbulon.video-collage.com ([151.204.231.237]) by out003.verizon.netESMTP <20041117190722.RPUV3485.out003.verizon.net@corbulon.video-collage.com> for ; Wed, 17 Nov 2004 13:07:22 -0600 Received: from 250-217.customer.cloud9.net (195-11.customer.cloud9.net [168.100.195.11])iAHJ7Hh1034327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Nov 2004 14:07:18 -0500 (EST) (envelope-from Mikhail.Teterin@murex.com) Received: from 250-217.customer.cloud9.net (mteterin@localhost [127.0.0.1]) iAHJ7CiA001273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 17 Nov 2004 14:07:12 -0500 (EST) (envelope-from Mikhail.Teterin@murex.com) Received: from localhost (localhost [[UNIX: localhost]]) iAHJ7BF4001272 for freebsd-current@freebsd.org; Wed, 17 Nov 2004 14:07:11 -0500 (EST) (envelope-from Mikhail.Teterin@murex.com) X-Authentication-Warning: mteterin.us.murex.com: mteterin set sender to Mikhail.Teterin@murex.com using -f From: Mikhail Teterin Organization: Murex North America To: freebsd-current@freebsd.org User-Agent: KMail/1.7.1 MIME-Version: 1.0 Content-Disposition: inline X-UID: 6291 X-Length: 1249 Date: Wed, 17 Nov 2004 14:07:11 -0500 Content-Type: Multipart/Mixed; boundary="Boundary-00=_fF6mByMcCkZoh78" Message-Id: <200411171407.11793.Mikhail.Teterin@murex.com> X-Virus-Scanned: clamd / ClamAV version devel-20040615, clamav-milter version 0.73a on corbulon.video-collage.com X-Virus-Status: Clean X-Scanned-By: MIMEDefang 2.43 X-Authentication-Info: Submitted using SMTP AUTH at out003.verizon.net from [151.204.231.237] at Wed, 17 Nov 2004 13:07:19 -0600 X-Mailman-Approved-At: Thu, 18 Nov 2004 13:20:40 +0000 X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: open(), mmap(), sendfile() vs. the file's access time X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2004 19:07:24 -0000 --Boundary-00=_fF6mByMcCkZoh78 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hello! It appears, only read() modifies a file's atime. Otherwise, a file can be open()-ed and subsequently _accessed_ through mmap or sendfile()-ed away without atime being changed. Does not seem right... Should open() update atime? My first reaction would be yes, but on Linux and Solaris the behaviour is the same (try attached program). Should sendfile()? What about mmap() -- there are some hairy usages?.. All I'm trying to do is track the last time a file was downloaded from the web-server. But Apache uses sendfile() (zero copy and what not) and thus no luck :-( Thanks! Yours, -mi --Boundary-00=_fF6mByMcCkZoh78--