This is called on each close() of the opened file.
Since file descriptors can be duplicated (dup, dup2, fork), for one open call there may be many flush calls.
Filesystems shouldn't assume that flush will always be called after some writes, or that if will be called at all.
fi->fh will contain the value set by the open method, or will be undefined if the open method didn't set any value.
NOTE: the name of the method is misleading, since (unlike fsync) the filesystem is not forced to flush pending writes. One reason to flush data, is if the filesystem wants to return write errors.
Valid replies: fuse_reply_err