HomeFreeBSD

fusefs: update atime on reads when using cached attributes

Description

fusefs: update atime on reads when using cached attributes

When using cached attributes, whether or not the data cache is enabled,
fusefs must update a file's atime whenever it reads from it, so long as
it wasn't mounted with -o noatime. Update it in-kernel, and flush it to
the server on close or during the next setattr operation.

The downside is that close() will now frequently trigger a FUSE_SETATTR
upcall. But if you care about performance, you should be using
-o noatime anyway.

MFC after: 2 weeks
Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D33145

Details

Provenance
asomersAuthored on Nov 29 2021, 1:53 AM
Reviewer
pfg
Differential Revision
D33145: fusefs: update atime on reads when using cached attributes
Parents
rG65d70b3bae0c: fusefs: fix copy_file_range when extending a file
Branches
Unknown
Tags
Unknown