]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: automatically update mtime and ctime on write
authorasomers <asomers@FreeBSD.org>
Tue, 25 Jun 2019 23:40:18 +0000 (23:40 +0000)
committerasomers <asomers@FreeBSD.org>
Tue, 25 Jun 2019 23:40:18 +0000 (23:40 +0000)
commit9530cadcceeeb19517d9c56f4182824c71537ea8
treed6216634b4f3e18ca55790d12b112de0d71a594b
parent1ba5bef628060e02cb4791d833a6896018206ef4
fusefs: automatically update mtime and ctime on write

Writing should implicitly update a file's mtime and ctime.  For fuse, the
server is supposed to do that.  But the client needs to do it too, because
the FUSE_WRITE response does not include time attributes, and it's not
desirable to issue a GETATTR after every WRITE.  When using the writeback
cache, there's another hitch: the kernel should ignore the mtime and ctime
fields in any GETATTR response for files with a dirty write cache.

Sponsored by: The FreeBSD Foundation
sys/fs/fuse/fuse_internal.c
sys/fs/fuse/fuse_io.c
sys/fs/fuse/fuse_node.c
sys/fs/fuse/fuse_node.h
tests/sys/fs/fusefs/io.cc
tests/sys/fs/fusefs/write.cc