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] 5c0dbfe3eb
[2] 4c21d696e9/sshfs.c (L812)
[3] https://github.com/libfuse/sshfs/issues/11#issuecomment-339407557
This commit is contained in:
Viktor Szakats 2019-09-12 14:33:32 +02:00 committed by Nikolaus Rath
parent 4c21d696e9
commit 667cf34622
1 changed files with 4 additions and 0 deletions

View File

@ -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;