Commit 8835238a authored by Ross Lagerwall's avatar Ross Lagerwall Committed by Alexander Larsson
Browse files

fuse: Use the big_writes option to speed up writes

Without the big_writes option, fuse uses a block size of 4096 bytes
which results in poor write performance.  So use the big_writes option
to write blocks up to 64KiB in size.

https://bugzilla.gnome.org/show_bug.cgi?id=652540
parent 1474a612
......@@ -2397,6 +2397,10 @@ vfs_init (struct fuse_conn_info *conn)
/* Prevent out-of-order readahead */
conn->async_read = 0;
/* Use up to a 64KiB write block size. Only has an effect if -o big_writes
* is given on the command-line. */
conn->max_write = 65536;
return NULL;
}
......
......@@ -83,7 +83,7 @@ on_name_acquired (GDBusConnection *connection,
if (!no_fuse)
{
char *fuse_path;
char *argv2[4];
char *argv2[6];
/* Use the old .gvfs location as fallback, not .cache/gvfs */
if (g_get_user_runtime_dir() == g_get_user_cache_dir ())
......@@ -101,9 +101,11 @@ on_name_acquired (GDBusConnection *connection,
/* Opengroup. On system with the uClibc library this will badly */
/* hang the process. */
argv2[0] = LIBEXEC_DIR "/gvfsd-fuse";
argv2[1] = "-f";
argv2[2] = fuse_path;
argv2[3] = NULL;
argv2[1] = fuse_path;
argv2[2] = "-f";
argv2[3] = "-o";
argv2[4] = "big_writes";
argv2[5] = NULL;
g_spawn_async (NULL,
argv2,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment