aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
diff options
context:
space:
mode:
authorViktor Szakats <vszakats@users.noreply.github.com>2019-09-12 14:33:32 +0200
committerNikolaus Rath <Nikolaus@rath.org>2019-09-12 05:33:32 -0700
commit667cf34622e2e873db776791df275c7a582d6295 (patch)
treef2478fa1f4a51e9c754bdcf8eb28d690aa2e9b17 /sshfs.c
parent4c21d696e9d46bebae0a936e2aec72326c5954ea (diff)
downloadsshfs-667cf34622e2e873db776791df275c7a582d6295.tar
sshfs-667cf34622e2e873db776791df275c7a582d6295.tar.gz
sshfs-667cf34622e2e873db776791df275c7a582d6295.tar.bz2
sshfs-667cf34622e2e873db776791df275c7a582d6295.zip
sshfs: fix another instance preventing use of global I/O size on macOS (#185)
Following-up on [1], there was another instance where blksize was set to a non-zero value, thus making it impossible to configure global I/O size on macOS, and using [2] the hard-wired value of 4096 bytes instead, resulting in uniformly poor performance [3]. With this patch, setting I/O size to a reasonable large value, will result in much improved performance, e.g.: -o iosize=1048576 [1] https://github.com/osxfuse/sshfs/commit/5c0dbfe3eb40100f9277e863926f2e7d7c9a5a4c [2] https://github.com/libfuse/sshfs/blob/4c21d696e9d46bebae0a936e2aec72326c5954ea/sshfs.c#L812 [3] https://github.com/libfuse/sshfs/issues/11#issuecomment-339407557
Diffstat (limited to 'sshfs.c')
-rw-r--r--sshfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sshfs.c b/sshfs.c
index a2d072a..f1c84d4 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -3920,7 +3920,11 @@ int main(int argc, char *argv[])
}
#endif /* __APPLE__ */
+#ifdef __APPLE__
+ sshfs.blksize = 0;
+#else
sshfs.blksize = 4096;
+#endif
/* SFTP spec says all servers should allow at least 32k I/O */
sshfs.max_read = 32768;
sshfs.max_write = 32768;