diff options
author | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-03 18:26:19 +0200 |
---|---|---|
committer | Nikolaus Rath <Nikolaus@rath.org> | 2017-08-03 18:26:19 +0200 |
commit | 63300fd564de615ba70722347eea45afe1950a33 (patch) | |
tree | 4072bb99efb58dd47c03f878f6c94b43154e468d | |
parent | 45710c81d746fab84ee60e8b474277fbaa76e5a7 (diff) | |
download | sshfs-63300fd564de615ba70722347eea45afe1950a33.tar sshfs-63300fd564de615ba70722347eea45afe1950a33.tar.gz sshfs-63300fd564de615ba70722347eea45afe1950a33.tar.bz2 sshfs-63300fd564de615ba70722347eea45afe1950a33.zip |
Accept -o cache_* options for backward compatibility.
Fixes: #73.
-rw-r--r-- | ChangeLog.rst | 3 | ||||
-rw-r--r-- | cache.c | 13 | ||||
-rw-r--r-- | sshfs.c | 6 |
3 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog.rst b/ChangeLog.rst index 606fa9d..90f067f 100644 --- a/ChangeLog.rst +++ b/ChangeLog.rst @@ -4,6 +4,9 @@ Unreleased Changes * Fixed a crash due to a race condition when listing directory contents. +* For improved backwards compatibility, SSHFS now also silently + accepts the old ``-o cache_*`` options. + Release 3.0.0 (2017-07-08) -------------------------- @@ -586,6 +586,19 @@ static const struct fuse_opt cache_opts[] = { clean_interval_secs), 0 }, { "dcache_min_clean_interval=%u", offsetof(struct cache, min_clean_interval_secs), 0 }, + + /* For backwards compatibility */ + { "cache_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 }, + { "cache_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 }, + { "cache_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 }, + { "cache_stat_timeout=%u", offsetof(struct cache, stat_timeout_secs), 0 }, + { "cache_dir_timeout=%u", offsetof(struct cache, dir_timeout_secs), 0 }, + { "cache_link_timeout=%u", offsetof(struct cache, link_timeout_secs), 0 }, + { "cache_max_size=%u", offsetof(struct cache, max_size), 0 }, + { "cache_clean_interval=%u", offsetof(struct cache, + clean_interval_secs), 0 }, + { "cache_min_clean_interval=%u", offsetof(struct cache, + min_clean_interval_secs), 0 }, FUSE_OPT_END }; @@ -423,7 +423,13 @@ static struct fuse_opt sshfs_opts[] = { FUSE_OPT_KEY("-p ", KEY_PORT), FUSE_OPT_KEY("-C", KEY_COMPRESS), FUSE_OPT_KEY("-F ", KEY_CONFIGFILE), + + /* For backwards compatibility */ + SSHFS_OPT("cache=yes", dir_cache, 1), + SSHFS_OPT("cache=no", dir_cache, 0), + FUSE_OPT_END + }; static struct fuse_opt workaround_opts[] = { |