]> git.neil.brown.name Git - LaFS.git/commit
Store atime safely when dirty_inode is called.
authorNeilBrown <neilb@suse.de>
Fri, 4 Mar 2011 23:44:22 +0000 (10:44 +1100)
committerNeilBrown <neilb@suse.de>
Fri, 4 Mar 2011 23:44:22 +0000 (10:44 +1100)
commitf23af414e7a83e2a19c1be107ff683d2dbc67305
tree488b29b7c3b31c7f0c0f223d5fc1a9908359939d
parent1eb2efdfa4a54f3f39df0cbaec135c07bdc8fc5e
Store atime safely when dirty_inode is called.

When dirty_inode is called the atime might have been the only thing
updated.
If it was, then we want to record it in the atime file and not mark
the inode dirty.
If it wasn't (or if the inode is easily marked dirty) we want to
simply mark the inode dirty and make sure the correct atime is
recorded when the inode is flushed.

So detect the cases based on whether the inode dblock is available and
pinned.  When it isn't just update the atime-delta in the atime file.

Signed-off-by: NeilBrown <neilb@suse.de>
inode.c