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
rG91a60385457a: Add missing change from c76461e064b675c8edd3b1d9bb917905a885a860
Branches
Unknown
Tags
Unknown