[haiku-development] Re: Access times of files and stat

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 07 Dec 2008 23:07:43 +0100

On 2008-12-07 at 16:31:43 [+0100], Adrian Panasiuk <adek336@xxxxxxxxx> 
wrote:
> It seems the access times are pretty useless here, as they're changed
> when stat or ls are called.
> 
> stat file, ls file --time=access -l report the current time as the access 
> time.
> 
> This is incorrect, right? As a reference, on Linux stat and ls don't
> bump the access time.

AFAIK BFS's on disk structure doesn't support an access time. Apparently 
Axel decided to just return time(NULL), which might not be the best choice. 
But I don't have any really bright idea either. Maybe one could maintain 
the access time correctly while the inode is in memory and just forget it 
when it's evicted. When the inode is loaded from disk, the access (and 
change) time could be initialized with the modified time. That would 
probably result in a more consistent behavior.

CU, Ingo

Other related posts: