linux/fs/fuse
Amir Goldstein a390ccb316 fuse: add FOPEN_NOFLUSH
Add flag returned by FUSE_OPEN and FUSE_CREATE requests to avoid flushing
data cache on close.

Different filesystems implement ->flush() is different ways:
 - Most disk filesystems do not implement ->flush() at all
 - Some network filesystem (e.g. nfs) flush local write cache of
   FMODE_WRITE file and send a "flush" command to server
 - Some network filesystem (e.g. cifs) flush local write cache of
   FMODE_WRITE file without sending an additional command to server

FUSE flushes local write cache of ANY file, even non FMODE_WRITE
and sends a "flush" command to server (if server implements it).

The FUSE implementation of ->flush() seems over agressive and
arbitrary and does not make a lot of sense when writeback caching is
disabled.

Instead of deciding on another arbitrary implementation that makes
sense, leave the choice of per-file flush behavior in the hands of
the server.

Link: https://lore.kernel.org/linux-fsdevel/CAJfpegspE8e6aKd47uZtSYX8Y-1e1FWS0VL0DH2Skb9gQP5RJQ@mail.gmail.com/
Suggested-by: Miklos Szeredi <mszeredi@redhat.com>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2021-10-28 10:20:31 +02:00
..
acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
control.c fuse: name fs_context consistently 2021-08-04 13:22:58 +02:00
cuse.c cuse: simplify refcount 2021-04-14 10:40:58 +02:00
dax.c fuse: always invalidate attributes after writes 2021-10-28 09:45:32 +02:00
dev.c fuse: always invalidate attributes after writes 2021-10-28 09:45:32 +02:00
dir.c fuse: only update necessary attributes 2021-10-28 09:45:33 +02:00
file.c fuse: add FOPEN_NOFLUSH 2021-10-28 10:20:31 +02:00
fuse_i.h fuse: only update necessary attributes 2021-10-28 09:45:33 +02:00
inode.c fuse: add cache_mask 2021-10-28 09:45:33 +02:00
ioctl.c fuse: use kmap_local_page() 2021-10-22 17:03:01 +02:00
Kconfig virtiofs: implement dax read/write operations 2020-09-10 11:39:23 +02:00
Makefile fuse: move ioctl to separate source file 2021-04-12 15:04:30 +02:00
readdir.c fuse: only update necessary attributes 2021-10-28 09:45:33 +02:00
virtio_fs.c fuse: clean up fuse_mount destruction 2021-10-21 10:01:39 +02:00
xattr.c fuse: move fuse_invalidate_attr() into fuse_update_ctime() 2021-10-22 17:03:01 +02:00