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
This commit is contained in:
mooredan@suncup.net 2011-02-12 16:48:23 +00:00
parent 6a3a68b01c
commit ecaaf4d324
4 changed files with 15 additions and 3 deletions

4
README
View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;