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.

Reviewed by: pfg
Differential Revision: https://reviews.freebsd.org/D33145

(cherry picked from commit 91972cfcddf950d7a9c33df5a9171ada1805a144)

fusefs: fix 32-bit build of the tests after 91972cfcddf

(cherry picked from commit d109559ddbf7afe311c1f1795ece137071406db8)

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
rG000ce6dee1fa: fusefs: fix copy_file_range when extending a file
Branches
Unknown
Tags
Unknown