aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolaus Rath <Nikolaus@rath.org>2017-08-04 15:39:25 +0200
committerNikolaus Rath <Nikolaus@rath.org>2017-08-04 15:39:25 +0200
commit1e6e067fdf91d54bcf72071b00315969cf1ea9d7 (patch)
tree87f45b2f3b5b21981916590f8e66c6b13848855b
parent44a56f0cac2ab03f9bbbc3dc9c5e1d98d08d2b25 (diff)
downloadsshfs-1e6e067fdf91d54bcf72071b00315969cf1ea9d7.tar
sshfs-1e6e067fdf91d54bcf72071b00315969cf1ea9d7.tar.gz
sshfs-1e6e067fdf91d54bcf72071b00315969cf1ea9d7.tar.bz2
sshfs-1e6e067fdf91d54bcf72071b00315969cf1ea9d7.zip
Disable writeback cache for now
Writeback cache seems to cause dataloss in some situations. We need to investigate this first. See https://github.com/libfuse/sshfs/issues/72.
-rw-r--r--ChangeLog.rst4
-rw-r--r--sshfs.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst
index 90f067f..d5276cf 100644
--- a/ChangeLog.rst
+++ b/ChangeLog.rst
@@ -1,6 +1,10 @@
Unreleased Changes
------------------
+* Temporarily disabled the writeback cache feature, since there
+ have been reports of dataloss when appending to files when
+ writeback caching is enabled.
+
* Fixed a crash due to a race condition when listing
directory contents.
diff --git a/sshfs.c b/sshfs.c
index 7c984f3..3c4f242 100644
--- a/sshfs.c
+++ b/sshfs.c
@@ -3852,7 +3852,7 @@ int main(int argc, char *argv[])
sshfs.wfd = -1;
sshfs.ptyfd = -1;
sshfs.dir_cache = 1;
- sshfs.writeback_cache = 1;
+ sshfs.writeback_cache = 0;
sshfs.show_help = 0;
sshfs.show_version = 0;
sshfs.singlethread = 0;
@@ -3900,7 +3900,11 @@ int main(int argc, char *argv[])
fprintf(stderr, "see `%s -h' for usage\n", argv[0]);
exit(1);
}
-
+
+ if(sshfs.writeback_cache)
+ printf("NOTICE: writeback cache is disabled in this release due to potential\n"
+ "dataloss. It will be re-enabled in a future SSHFS release.\n");
+
if (sshfs.idmap == IDMAP_USER)
sshfs.detect_uid = 1;
else if (sshfs.idmap == IDMAP_FILE) {