aboutsummaryrefslogtreecommitdiff
path: root/sshfs.c
AgeCommit message (Collapse)Author
2017-08-06Re-enabled writeback cache.Nikolaus Rath
Fixes: #72.
2017-08-06Support O_APPEND.Nikolaus Rath
Fixes: #76.
2017-08-06Actually disable writeback cache, instead of just claiming to do so.Nikolaus Rath
2017-08-04Disable writeback cache for nowNikolaus Rath
Writeback cache seems to cause dataloss in some situations. We need to investigate this first. See https://github.com/libfuse/sshfs/issues/72.
2017-08-04Removed unused variable.Nikolaus Rath
2017-08-03Don't check st_mode of mountpointNikolaus Rath
It is not clear what this check is supposed to achieve, and it seems to fail in some situations (cf issue #57). Fixes: #57.
2017-08-03Accept -o cache_* options for backward compatibility.Nikolaus Rath
Fixes: #73.
2017-07-13Fall back to global I/O size on macOSBenjamin Fleischer
The st_blksize value of struct stat represents the optimal block size for file I/O operations. FUSE for macOS will use this value when preforming read or write operations on the file. The smaller st_blksize is the more context switches are required to complete the operation. Setting st_blksize to 0 results in FUSE for macOS falling back to the global I/O size, that can be specified through the "-o iosize=..." mount-time option. Fixes osxfuse/osxfuse#389 and osxfuse/sshfs#33
2017-07-13Don't require mount point to exists on macOSBenjamin Fleischer
By default volumes are mounted under /Volumes on macOS. Since macOS 10.12 the /Volumes directory is root-owned. In order to allow non- privileged users to mount FUSE volumes under /Volumes FUSE will create non-existent mount points automatically. Fixes osxfuse/sshfs#27
2017-07-12sshfs_open_commin(): fix compiler warningNikolaus Rath
wrctr cannot be used without having been initialized, but the compiler is too dumb to see that.
2017-07-12sftp_readdir_async(): don't access request when it may have been freedNikolaus Rath
Fixes: #7
2017-07-08Switch to libfuse 3.1.0Nikolaus Rath
libfuse 3.0.0 is rather new and not widely used yet, so requiring libfuse 3.1.0 right away shouldn't be a problem.
2017-07-08Switch to libfuse 3.0.Nikolaus Rath
2017-07-08Re-enabled cache support.Nikolaus Rath
2017-06-22Split readdir() into opendir(), readdir() and releasedir()Nikolaus Rath
This re-enables support for nullpath_ok. The cache remains disabled.
2017-06-22Transition from getdir() to readdir(), temporarily disable cacheNikolaus Rath
This commit enables the use of readdir() instead of getdir(). It also completely disables the cache and the nullpath_ok feature. This will be fixed in the next commits.
2017-06-07Fixed compiler warningsNikolaus Rath
2017-06-07Dropped support for libfuse < 2.9Nikolaus Rath
This is in preparation for the move to libfuse 3.0
2017-06-06Remove support for "all" workaroundsNikolaus Rath
This should never be used. We may add new workarounds in the future, and they should only be enabled explicitly when needed.
2017-06-06Add fstat workaround to help output.Nikolaus Rath
2017-06-06Dropped nodelaysrv workaroundNikolaus Rath
The same effect (enabling NODELAY on the server side *and* enabling X11 forwarding) can be achieved by explicitly passing `-o ForwardX11`
2017-06-06Don't call g_thread_init()Nikolaus Rath
No longer required since glib 2.32.
2017-06-06Fixed compiler warningNikolaus Rath
2017-06-06Dropped nodelay workaroundNikolaus Rath
This was a performance improvement for SSH versions prior to 4.4. There is no reason to continue to support this.
2017-06-05main(): setup signal handlers before connectingNikolaus Rath
Otherwise, aborting the password prompt with Ctrl+C will also kill the sshfs process and leave the mountpoint inaccessible. Fixes: #9.
2017-05-31Update the missing options (that make sense from ssh_config)Jakub Jelen
2017-01-12Merge pull request #23 from billziss-gh/masterNikolaus Rath
Port SSHFS to Cygwin
2016-07-28Remove call to g_slice_set_config()Benjamin Fleischer
It is unclear why G_SLICE_CONFIG_ALWAYS_MALLOC has been set before but doing so with the latest version of GLib (2.46.2) results in the following warning: GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed This fixes issue osxfuse/sshfs#17
2016-06-22port sshfs to cygwinBill Zissimopoulos
2016-06-06Require paths for truncate/fstat workaroundsRian Hunter
Commit 74bfa3850a2568f96dd1d090a9386534c9bb4629 allowed sshfs to run without requiring a non-NULL path argument for certain operations. This was erroneous in the case of using certain workarounds.
2016-06-01Support the lack of paths when cache is offRian Hunter
Before FUSE 2.9, FUSE had to emulate unlink() if a file was still open via renaming to a hidden file. This was due to the requirement that a valid "path" argument must be submitted for many FUSE operations. FUSE 2.9 introduced the flag_nullpath_ok and flag_nopath flags that allow a FUSE file system to signal to FUSE that the "path" argument may be NULL in certain operations. sshfs doesn't require paths if the cache isn't used so communicate that information to the FUSE layer.
2016-06-01Implement support for "fsync@openssh.com"Rian Hunter
OpenSSH implements fsync() via the extension "fsync@openssh.com". This change uses that extension when receiving a FUSE fsync request.
2016-02-10Expose the cache clean interval settings as flagsJulio Merino
Allow the user to customize the cache regular and minimum clean intervals as flags via the new cache_clean_interval and cache_min_clean_interval options. While doing this, rename the internal variables and constants to suffix them with their unit (seconds).
2016-02-10Expose the maximum cache size setting as a flagJulio Merino
Allow the user to customize the size of the sshfs cache by adding a new max_cache_size flag and turning the hardcoded constant into a variable.
2016-02-08Unconditionally mlock the password in memoryJulio Merino
Revision b4023a19 added an mlock call to ensure the sshfs password is kept in memory, but did so only for OS X. This is a good idea in general, so let's remove the condition.
2016-02-08Remove apparently-unnecessary lockJulio Merino
Revision b4023a19dd7ec7a099d2e0df491547cf3bb6bec3, which imported the MacFUSE-specific sshfs fixes into osxfuse-sshfs, added a lock to handle the refs reference counter of the sshfs_file structure. However, this lock was only added for OS X, which is a very strange thing to do. One may think that this was only because MacFUSE 2.2 had some semantics that differed from regular FUSE, and that would have been quite stupid for compatibility reasons. A few simple tests show no issues after removing this lock, so let's keep it out for now. If things break, we know what to look at.
2016-02-08Avoid using cpp for sshfs.1 generationJulio Merino
Move the logic to determine which values to stick into the manual page to the configure script and replace the logic to build the sshfs.1 manual page with sed instead of abusing cpp. I'm not using AC_OUTPUT here because this macro is typically used to generate support build files. Final artifacts of the build should, in general, be built by the Makefile itself.
2016-02-08Remove LIBDIR explicit definitionJulio Merino
Makefile.am always sets LIBDIR in CPPFLAGS. There is no need for sshfs.c to redefine it to a bogus value when not present, and much less to only do so for the Darwin case only.
2016-02-08Drop the cache_enabled hackJulio Merino
cache_enabled leaked the cache.on setting from the cache module abstraction back into sshfs, and it only did so for the Darwin case. This hack was being used to avoid calling cache_add_attr and cache_invalidate when the cache was disabled... but these two functions already do nothing when in that case: there is no need to do a second check in the caller.
2016-02-08Drop OSXFUSE_SSHFS_VERSIONJulio Merino
Now that we are unifying osxfuse's sshfs into libfuse's version, there should not be two different version identifiers. Drop osxfuse's one.
2016-02-08Merge remote-tracking branch 'osxfuse/master' into merge-osxfuseJulio Merino
Pull in all changes from osxfuse's fork of sshfs into libfuse's sshfs. There need not be two different copies of this codebase, particularly because libfuse's version is already autoconf-ified and can support multiple platforms. The merge is mostly clean with just a few manual edits to resolve conflicts.
2015-04-14sshfs: Increase the maximum length of the passwordMiklos Szeredi
read from stdin to 1024 characters. Reported by: Mario A. Valdez-Ramirez.
2014-02-10sshfs-return-the-correct-x_ok-accessMiklos Szeredi
sshfs-fuse always returned 0 in access(file, X_OK) calls, causing nautilus to prompt "Do you want to run "login.defs", or display its contents?" for text files that were not executable. Reported by: Alkis Georgopoulos
2014-02-03Bump version to 2.5.0Benjamin Fleischer
2014-02-02Merge tag 'sshfs_2_5'Benjamin Fleischer
Conflicts: sshfs.c
2014-01-08Implement asynchronous readdirAlexander Neumann
Accessing directories with many (several thousand) files over sshfs is slow, because most SFTP server implementations only send a fixed amount of entries per READDIR command (e.g. OpenSSH SFTP: 100 entries). This patch implements sending several READDIR commands in parallel, in order to speed up directory listing in these cases. An option (sync_readdir) is also added so that users can easily switch on the old behaviour. The performance improvement is astonishing. Accessing a directory with 30k files in from a remote server that has a RTT of 15ms via OpenSSH SFTP: Synchronous readdir: $ ./sshfs -o sync_readdir host:/tmp /mnt/temp $ time "ls" -1 /mnt/temp/test | wc -l 30000 "ls" -1 /mnt/temp/test 0.07s user 0.01s system 1% cpu 6.928 total Asynchronous readdir: $ ./sshfs host:/tmp /mnt/temp $ time "ls" -1 /mnt/temp/test | wc -l 30000 "ls" -1 /mnt/temp/test 0.07s user 0.01s system 12% cpu 0.605 total Accessing a directory with 100k files shows even more dramatic improvement: Synchronous readdir: $ ./sshfs -o sync_readdir host:/tmp /mnt/temp $ time "ls" -1 /mnt/temp/test2 | wc -l 100000 "ls" -1 /mnt/temp/test2 0.67s user 1.22s system 0% cpu 3:31.56 total Asynchronous readdir: $ ./sshfs host:/tmp /mnt/temp $ time "ls" -1 /mnt/temp/test2 | wc -l 100000 "ls" -1 /mnt/temp/test2 0.20s user 0.03s system 14% cpu 1.631 total This can easily be reproduced by creating a directory on a server and touching a lot of files in it: $ mkdir /tmp/test $ cd /tmp/test $ for i in $(seq 1 30000); do touch $i; done Signed-off-by: Alexander Neumann <alexander@bumpern.de>
2014-01-08Add -o disable_hardlink option (debian bug #670926)Miklos Szeredi
Reported by Louis-David Mitterrand
2014-01-07Map SSH2_FX_FAILURE to ENOTEMPTY for rmdirMiklos Szeredi
Reported by Ross Lagerwall
2013-08-03Merge remote-tracking branch 'upstream/master'Benjamin Fleischer
Conflicts: ChangeLog configure.ac sshfs.1.in sshfs.c
2013-02-05Add FIXME for deadlock if $PATH contains mountpoint.Miklos Szeredi
Reported by Joachim Kopp