Skip to content

Commit

Permalink
sshfs: backport upstream commit
Browse files Browse the repository at this point in the history
* This commit backports libfuse/sshfs commit 667cf34

Original commit message:

    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] osxfuse/sshfs@5c0dbfe
    [2] https://github.com/libfuse/sshfs/blob/4c21d696e9d46bebae0a936e2aec72326c5954ea/sshfs.c#L812
    [3] libfuse/sshfs#11 (comment)
  • Loading branch information
Jérôme Mainka authored and drkp committed Jun 26, 2021
1 parent 36b6532 commit 3017a59
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fuse/sshfs/files/sshfs.c.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
@@ -3859,7 +3859,11 @@
}
#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;

1 comment on commit 3017a59

@ryandesign
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drkp The revision of the port needs to be increased if this change is to be propagated to users.

Please sign in to comment.