Skip to content

Commit

Permalink
sshfs: fix issue preventing use of global I/O size on macOS
Browse files Browse the repository at this point in the history
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 [4] 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)
[4] https://github.com/osxfuse/osxfuse/wiki/Mount-options#iosize

Closes #44173.

Signed-off-by: FX Coudert <[email protected]>
  • Loading branch information
vszakats authored and fxcoudert committed Sep 13, 2019
1 parent fc00fe8 commit 1d31064
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Formula/sshfs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Sshfs < Formula
homepage "https://osxfuse.github.io/"
url "https://github.com/libfuse/sshfs/releases/download/sshfs-2.10/sshfs-2.10.tar.gz"
sha256 "70845dde2d70606aa207db5edfe878e266f9c193f1956dd10ba1b7e9a3c8d101"
revision 1
revision 2

bottle do
cellar :any
Expand All @@ -19,6 +19,16 @@ class Sshfs < Formula
depends_on "glib"
depends_on :osxfuse

# Apply patch that clears one remaining roadblock that prevented setting
# a custom I/O buffer size on macOS. With this patch in place, it's
# recommended to use e.g. `-o iosize=1048576` (or other, reasonable value)
# when lauching `sshfs`, for improved performance.
# See also: https://github.com/libfuse/sshfs/issues/11
patch do
url "https://github.com/libfuse/sshfs/commit/667cf34622e2e873db776791df275c7a582d6295.diff?full_index=1"
sha256 "6a121d58a94cf0efebbfa217d62aa4d9915a8e6573ae2c086170ff9d9fc09456"
end

def install
system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}"
system "make", "install"
Expand Down

0 comments on commit 1d31064

Please sign in to comment.