diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2008-04-22 13:36:26 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2008-04-22 13:36:26 +0000 |
commit | 4b88fc47316c0d56ba29e64ca0cd5e36f427b507 (patch) | |
tree | 998000291888cc1954288544ec2724461251707a | |
parent | b246ad3da0ca47cda43878aa11b7b7fad2c07e87 (diff) | |
download | sshfs-4b88fc47316c0d56ba29e64ca0cd5e36f427b507.tar sshfs-4b88fc47316c0d56ba29e64ca0cd5e36f427b507.tar.gz sshfs-4b88fc47316c0d56ba29e64ca0cd5e36f427b507.tar.bz2 sshfs-4b88fc47316c0d56ba29e64ca0cd5e36f427b507.zip |
Limit write requests to 64kB
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | sshfs.c | 7 |
2 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,8 @@ * Allow the '-ossh_command=CMD' command to contain parameters. Escape charater is backslash. + * Limit write requests to 64kB. + 2008-04-21 Miklos Szeredi <miklos@szeredi.hu> * Fix incorrect disk usage reported by 'du' for files of size 4GB @@ -172,6 +172,7 @@ struct sshfs { int no_check_root; int detect_uid; unsigned max_read; + unsigned max_write; unsigned ssh_ver; int sync_write; int sync_read; @@ -280,6 +281,7 @@ static struct fuse_opt sshfs_opts[] = { SSHFS_OPT("ssh_command=%s", ssh_command, 0), SSHFS_OPT("sftp_server=%s", sftp_server, 0), SSHFS_OPT("max_read=%u", max_read, 0), + SSHFS_OPT("max_write=%u", max_write, 0), SSHFS_OPT("ssh_protocol=%u", ssh_ver, 0), SSHFS_OPT("-1", ssh_ver, 1), SSHFS_OPT("workaround=%s", workarounds, 0), @@ -2995,6 +2997,7 @@ int main(int argc, char *argv[]) sshfs.blksize = 4096; sshfs.max_read = 65536; + sshfs.max_write = 65536; sshfs.nodelay_workaround = 1; sshfs.nodelaysrv_workaround = 0; sshfs.rename_workaround = 0; @@ -3087,11 +3090,15 @@ int main(int argc, char *argv[]) if (sshfs.max_read > 65536) sshfs.max_read = 65536; + if (sshfs.max_write > 65536) + sshfs.max_write = 65536; if (fuse_is_lib_option("ac_attr_timeout=")) fuse_opt_insert_arg(&args, 1, "-oauto_cache,ac_attr_timeout=0"); tmp = g_strdup_printf("-omax_read=%u", sshfs.max_read); fuse_opt_insert_arg(&args, 1, tmp); + tmp = g_strdup_printf("-omax_write=%u", sshfs.max_write); + fuse_opt_insert_arg(&args, 1, tmp); g_free(tmp); #if FUSE_VERSION >= 27 libver = fuse_version(); |