Lazily write inode timestamps to FUSE

Before this, the FUSE daemon receives a setattr inode timestamp
request for every write request. This can be crippling for write
performance or read performance during writes especially random
writes where the write back cache does not effectively coagulate
requests.

We now add the MS_LAZYTIME mount flag
(http://man7.org/linux/man-pages/man2/mount.2.html) to lazily flush
the timestamp updates from memory to disk

Test: m
Bug: 135341433
Change-Id: I95a467d5682a325b4099f32634d93ed2921f815e
gugelfrei
Zim 5 years ago
parent 981222f500
commit aeb87efb1f

@ -1023,7 +1023,8 @@ int MountUserFuse(userid_t user_id, const std::string& relative_path,
const int result_int =
TEMP_FAILURE_RETRY(mount("/dev/fuse", path.c_str(), "fuse",
MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_NOATIME, opts.c_str()));
MS_NOSUID | MS_NODEV | MS_NOEXEC | MS_NOATIME | MS_LAZYTIME,
opts.c_str()));
if (result_int != 0) {
PLOG(ERROR) << "Failed to mount " << path;
return -errno;

Loading…
Cancel
Save