From ecaaf4d324faeb38356ae26cdbb5533131ade7e8 Mon Sep 17 00:00:00 2001 From: "mooredan@suncup.net" Date: Sat, 12 Feb 2011 16:48:23 +0000 Subject: [PATCH] Implemented max_stat_cache_size as an option Resolves issue #157 git-svn-id: http://s3fs.googlecode.com/svn/trunk@316 df820570-a93a-0410-bd06-b72b767a4274 --- README | 4 +++- configure.ac | 2 +- doc/man/s3fs.1 | 5 ++++- src/s3fs.cpp | 7 +++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README b/README index d391cf3..27bc3ce 100644 --- a/README +++ b/README @@ -1,3 +1,5 @@ +THIS README CONTAINS OUTDATED INFORMATION - please refer to the wiki or --help + S3FS-Fuse S3FS is FUSE (File System in User Space) based solution to mount/unmount an Amazon S3 storage buckets and use system commands with S3 just like it was another Hard Disk. @@ -33,7 +35,7 @@ Congratulations. S3fs is now compiled and installed. Usage: ------ -In order to use s3fs, make sure you have the Access Key and the Secret Key handy. +In order to use s3fs, make sure you have the Access Key and the Secret Key handy. (refer to the wiki) First, create a directory where to mount the S3 bucket you want to use. Example (as root): mkdir -p /mnt/s3 Then run: s3fs mybucket /mnt/s3 diff --git a/configure.ac b/configure.ac index 204f43b..4f950fc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT(s3fs, 1.41) +AC_INIT(s3fs, 1.42) AC_CANONICAL_SYSTEM diff --git a/doc/man/s3fs.1 b/doc/man/s3fs.1 index 86769cb..a0de2d8 100644 --- a/doc/man/s3fs.1 +++ b/doc/man/s3fs.1 @@ -71,9 +71,12 @@ anonymously mount a public bucket when set to 1, ignores the $HOME/.passwd-s3fs \fB\-o\fR connect_timeout (default="10" seconds) time to wait for connection before giving up. .TP -\fB\-o\fR readwrite_timeout (default="30" seconds)j +\fB\-o\fR readwrite_timeout (default="30" seconds) time to wait between read/write activity before giving up. .TP +\fB\-o\fR max_stat_cache_size (default="10000" entries (about 4MB)) +maximum number of entries in the stat cache +.TP \fB\-o\fR url (default="http://s3.amazonaws.com") sets the url to use to access Amazon S3. If you want to use HTTPS, then you can set url=https://s3.amazonaws.com .SH FUSE/MOUNT OPTIONS diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 9589049..6e586cf 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -4473,6 +4473,9 @@ static void show_help (void) { " readwrite_timeout (default=\"30\" seconds)\n" " - time to wait between read/write activity before giving up\n" "\n" + " max_stat_cache_size (default=\"10000\" entries (about 4MB))\n" + " - maximum number of entries in the stat cache\n" + "\n" " url (default=\"http://s3.amazonaws.com\")\n" " - sets the url to use to access amazon s3\n" "\n" @@ -4652,6 +4655,10 @@ static int my_fuse_opt_proc(void *data, const char *arg, int key, struct fuse_ar readwrite_timeout = strtoul(strchr(arg, '=') + 1, 0, 10); return 0; } + if (strstr(arg, "max_stat_cache_size=") != 0) { + max_stat_cache_size = strtoul(strchr(arg, '=') + 1, 0, 10); + return 0; + } if (strstr(arg, "url=") != 0) { host = strchr(arg, '=') + 1; return 0;