HomeFreeBSD

fusefs: send FUSE_FLUSH during VOP_CLOSE

Description

fusefs: send FUSE_FLUSH during VOP_CLOSE

The FUSE protocol says that FUSE_FLUSH should be send every time a file
descriptor is closed. That's not quite possible in FreeBSD because multiple
file descriptors can share a single struct file, and closef doesn't call
fo_close until the last close. However, we can still send FUSE_FLUSH on
every VOP_CLOSE, which is probably good enough.

There are two purposes for FUSE_FLUSH. One is to allow file systems to
return EIO if they have an error when writing data that's cached
server-side. The other is to release POSIX file locks (which fusefs(5) does
not yet support).

PR: 236405, 236327
Sponsored by: The FreeBSD Foundation

Details

Provenance
asomersAuthored on
Parents
rS345851: Undo my previous erroneous commit changing the tcp_output kassert.
Branches
Unknown
Tags
Unknown