diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2013-09-25 20:42:34 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-10-02 10:20:01 +0200 |
commit | 3e8cc556fe13a32518ebdd4c11a11f0006083844 (patch) | |
tree | e364d0d4e63d69ab6275a8bd167fee4d9b3013a7 | |
parent | 64ccbde184653f2ce3ed3e5395eb336b379e5847 (diff) | |
download | gvfs-3e8cc556fe13a32518ebdd4c11a11f0006083844.tar.gz |
fuse: Enforce sync_read
When running multithreaded, fuse can issue readahead requests out of
order which can cause subsequent reads to fail with ENOTSUPP (if seeking
backward is not supported on the stream).
Force readahead to occur in order to prevent this problem.
-rw-r--r-- | client/gvfsfusedaemon.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index e8cada17..5763c1ca 100644 --- a/client/gvfsfusedaemon.c +++ b/client/gvfsfusedaemon.c @@ -2391,6 +2391,9 @@ vfs_init (struct fuse_conn_info *conn) /* Indicate O_TRUNC support for open() */ conn->want |= FUSE_CAP_ATOMIC_O_TRUNC; + /* Prevent out-of-order readahead */ + conn->async_read = 0; + return NULL; } |