]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
fusefs: don't force direct io for files opened O_WRONLY
authorasomers <asomers@FreeBSD.org>
Sat, 30 Mar 2019 00:57:07 +0000 (00:57 +0000)
committerasomers <asomers@FreeBSD.org>
Sat, 30 Mar 2019 00:57:07 +0000 (00:57 +0000)
commit99552bb6c6e8fa86e9ccb93021c9226de7831970
tree6d02072768c9318720c525e773f0050ed90fc582
parentb2f9195e90659d032a017f13dad7e72ff35bc3c2
fusefs: don't force direct io for files opened O_WRONLY

Previously fusefs would treat any file opened O_WRONLY as though the
FOPEN_DIRECT_IO flag were set, in an attempt to avoid issuing reads as part
of a RMW write operation on a cached part of the file.  However, the FUSE
protocol explicitly allows reads of write-only files for precisely that
reason.

Sponsored by: The FreeBSD Foundation
sys/fs/fuse/fuse_file.c
sys/fs/fuse/fuse_io.c
sys/fs/fuse/fuse_vnops.c
tests/sys/fs/fusefs/write.cc