1) Changed codes about memory leak
For memory leak, below codes are changed.
* calls malloc_trim function
* calls initializing NSS function, and adds configure
option "--enable-nss-init".
If libcurl is with NSS, s3fs initializes NSS manually.
This initializing NSS is enabled by "--enable-nss-init"
option at configure. if this option is specified, you
need "nss-devel" package.
* calls initializing libxml2(xmlInitParser).
* BIO functions have memory leak, calls CRYPTO_free_ex_data.
* changes cache structure.
* changes cache out logic to LRU.
* sets alignment for allcated memory in body data structure.
* adds ssl session into share handle. and adds nosscache option.
* deletes unused allocated memory.(bug)
* changes defaule parallel count of head request in readdir
(500->20)
* fixes some bugs.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@482 df820570-a93a-0410-bd06-b72b767a4274
1) Man file has wrong permissions for passwd file(Issue 291)
Fixes man page for wrong permissions of passwd file.
2) Fixes a bug and Strictly checks passwd file permission.
* Fixes a bug about checking passwd file permission.
A bug is that s3fs continues to run after s3fs finds invalid passwd
file permission.
* Checks passwd file strictly.
Before this revision, s3fs allows executable permission for a
passwd file and allows group writable permission for a passwd
file(which is not "/etc/passwd-s3fs").
New s3fs checks permission strictly, that is /etc/passwd-s3fs is
allowed owner readable/writable and group readable, and the
passwd file(which is not "/etc/passwd-s3fs") is allowed only owner
readable/writable.
3) Adds disable_noobj_cache option for no-existing object.
s3fs v1.68 always has to check whether file(or sub directory) exists
under object(path) when s3fs does some command, since s3fs has
recognized a directory which does not exist and has files or sub
directories under itself.
It increases ListBucket request and makes performance bad.
For performance if the disable_noobj_cache option is specified, s3fs
memorizes in stat cache that the object(file or directory) does not exist.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@420 df820570-a93a-0410-bd06-b72b767a4274
1) Feature Request: Compatability with other S3FS clients(Issue: 27)
Rechanges source code.
2) For other S3 clients
Supports the directory which is no objects.
If there is a object which has "/" charactor(ex. "<bucket>/dir/file"), the directory("dir") object is no object.
Exsample, you can upload the object which name is "s3://bucket/dir/file" by the s3cmd.
Then the "dir" is not object in bucket("dir").
This s3fs codes understands this case.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@414 df820570-a93a-0410-bd06-b72b767a4274
==========================
List of Changes
==========================
1) Fixes bugs
Fixes Issue 321: "no write permission for non-root user".
(http://code.google.com/p/s3fs/issues/detail?id=321)
Fixes a bug which s3fs does not set uid/gid headers when making symlink.
2) Cleanup code.
Adds a common function which converts the Last-Modified header to utime.
Deletes the useless cord and arranged it.
3) xmlns
Changes that s3fs can decide using the xmlns url automatically.
Then the noxmlns option is not needed anymore, but it is left.
4) Changes cache for performance
Changes stat cache, it accumulates stat information and some headers.
By adding some headers into cache, s3fs does not need to call curl_get_headers function.
After changing, one cache entry increases in about 500 bytes from about 144 byte.
Adds one condition to get out of the cache, that condition is by looking object's ETag.
It works good for noticing changes about obojects.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@400 df820570-a93a-0410-bd06-b72b767a4274
No changes for logic, only changes layout of functions and valiables between a file to a file.
Adds s3fs_util.cpp/s3fs_util.h/common.h
git-svn-id: http://s3fs.googlecode.com/svn/trunk@396 df820570-a93a-0410-bd06-b72b767a4274
1) Lifetime for the stats cache
Added the new option "stat_cache_expire".
This option which is specified by seconds means the lifetime for each stats cache entry.
If this option is not specified, the stats cache is kept in s3fs process until the stats cache grown to maximum size. (default)
If this option is specified, the stats cache entry is out from the memory when the entry expires time.
2) Enable file permission
s3fs before 1.62 did not consider the file access permission.
s3fs after this version can consider it.
For access permission, the s3fs_getattr() function was divided into sub function which can check the file access permission.
It is like access() function.
And the function calling the s3fs_getattr() calls this new sub function instead of s3fs_getattr().
Last the s3fs_opendir() function which is called by FUSE was added for checking directory access permission when listing the files in directory.
3) UID/GUID
When a file or a directory was created, the s3fs could not set the UID/GID as the user who executed a command.
(Almost the UID/GID are root, because the s3fs run by root.)
After this version, the s3fs set correct UID/GID as the user who executes the commond.
4) About the mtime
If the object does not have "x-amz-meta-mtime" meta, the s3fs uses the "Last-Modified" header instead of it.
But the s3fs had a bug in this code, and this version fixed this bug.
When user modified the file, the s3fs did not update the mtime of the file.
This version fixed this bug.
In the get_local_fd() function, the local file's mtime was changed only when s3fs run with "use_cache" option.
This version always updates the mtime whether the local cache file is used or not.
And s3fs_flush ( ) function set the mtime of local cache file from S3 object mtime, but it was wrong .
This version is that the s3fs_flush ( ) changes the mtime of S3 object from the local cache file or the tmpfile .
The s3fs cuts some requests, because the s3fs can always check mtime whether the s3fs uses or does not use the local cache file.
5) A case of no "x-amz-meta-mode"
If the object did not have "x-amz-meta-mtime" mete, the s3fs recognized the file as not regular file.
After this version, the s3fs recognizes the file as regular file.
6) "." and ".." directory
The s3fs_readdir() did not return "X" and "XX" directory name.
After this version, the s3fs is changed that it returns "X" and "XX".
Example, the result of "ls" lists "X" and "XX" directory.
7) Fixed a bug
The insert_object() had a bug, and it is fixed.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@390 df820570-a93a-0410-bd06-b72b767a4274