1) Changed condition for retrying multipart error
Changes condition that 404 is not retrying, other case is retrying,
when multipart request failed.
2) file type wrong
fdcache.h file type is wrong, so that fixed it.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@498 df820570-a93a-0410-bd06-b72b767a4274
* Fixed a bug
Fixes a bug that is dead loop when s3fs listed in a directory with
directory objects which was not object(no information).
This bug made by r493, and reported by issue 389.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@497 df820570-a93a-0410-bd06-b72b767a4274
1) Changed buffer size for file size
Changes a internal buffer size from size_t to offt_t.
It is a bug for 32 bit OS enviroment.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@496 df820570-a93a-0410-bd06-b72b767a4274
1) Overflow
About over 4GB file, when st_size which is member stat structure,
the value is overflow.
Fixed this bug and fixed like this bug in all sources.
2) Changed retrying request
If s3fs gets 500 HTTP status for multipart request, s3fs retry
to send same request.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@495 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed bugs
* Rename objects
Fixes s3fs specifies wrong part number of multipart rename.
And s3fs adds x-amz-acl and x-amz-server-side-encryption
header when rename objects.
2) Changed retry logic for multipart uploading(and renaming)
Sometimes, s3fs gets 400 HTTP response for one of part from
S3 when s3fs uploads a large object by multipart.
New logic retries uploading failed part until "retries"
option count.
3) Added action on utility mode.
s3fs have had utility mode for displaying the result of REST
listing multipart uploading.
Changed this row result(xml) to list, after that, s3fs starts
conversation for removing it.
Then you can remove the object which is failed uploading by
multipart, and do not need to pay for that ever.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@493 df820570-a93a-0410-bd06-b72b767a4274
* Fixed a bug
Fixes a bug that the retrying multipart post request is not
complete, then it is fixed.
This is reported by Issue 371#32.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@492 df820570-a93a-0410-bd06-b72b767a4274
* Fixed a bug
Fixes a bug that is mis-coding about retrying Multipart Post.
This is reported by Issue 371#28.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@491 df820570-a93a-0410-bd06-b72b767a4274
1) Supported IAM role
Supports IAM role by option, that is instead of AccessKeyID/
SecretAccessKey.
Adds new option "iam_role" which is specified as IAM role
name.(like s3fs-c)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@490 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug(about public_bucket)
Fixes a bug that public_bucket option does not work.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@489 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug(about curl_off_t)
Fixes a bug which is not use cast to curl_off_t from off_t(ssize_t)
at calling curl_easy_setopt with CURLOPT_POSTFIELDSIZE and
CURLOPT_INFILESIZE_LARGE.
Maybe this forgot cast occurred issue 471(failed multipart uploading).
git-svn-id: http://s3fs.googlecode.com/svn/trunk@488 df820570-a93a-0410-bd06-b72b767a4274
1) Changed debug message level
Changes a level and format for a debugging message about
parallel multipart upload in curl.cpp
git-svn-id: http://s3fs.googlecode.com/svn/trunk@487 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed Issue 371
Fixes a bug which is wrong return value in s3fs_truncate function(mis-coding).
Issue 371: ftruncate failed
git-svn-id: http://s3fs.googlecode.com/svn/trunk@486 df820570-a93a-0410-bd06-b72b767a4274
1) Re-Fixed Issue 368
Changes that s3fs checks always object stat information before opening it.
Then the object updates other s3fs process or other client, s3fs can know
it.
(Issue 368)1.73: Updating existing file on server 'a' does not change length
of file on server 'b'
git-svn-id: http://s3fs.googlecode.com/svn/trunk@485 df820570-a93a-0410-bd06-b72b767a4274
1) fixed a bug
fixes a code in s3fs.cpp.
It freed memory twice because of careless.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@484 df820570-a93a-0410-bd06-b72b767a4274
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) Fixed Issue 368
Fixed a bug that s3fs could not update local cache.
(Issue 368)1.73: Updating existing file on server 'a' does not change length of file on server 'b'
git-svn-id: http://s3fs.googlecode.com/svn/trunk@481 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed Issue 321
Fixed a bug that a value of umask option is not reflected
definitely.
(Issue 321) no write permission for non-root user
2) Fixed a bug about utimens
Fixed a bug that utimens function cloud not set value to the
other user's object which does not allowed writable.
3) Strictly option check.
Fixed checking s3fs options strictly.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@480 df820570-a93a-0410-bd06-b72b767a4274
1) Changed codes about initializing curl and openSSL
s3fs before this change called curl_global_init() two times
with curl_global_cleanup(). After reviewing this processing,
s3fs calls curl_global_init() one time.
Then s3fs_check_service function which checks user bucket
existing is called after calling fuse.
So this new processing does not have a problem, the codes
updated.
And about initializing openSSL(CRYPTO), old s3fs called only
static locking callback function(ex. CRYPTO_set_locking_callback()).
Added calling dynamic locking callback function for CRYPTO
(ex. CRYPTO_set_dynlock_lock_callback()).
git-svn-id: http://s3fs.googlecode.com/svn/trunk@479 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed codes
Fixed compiling error on 32bit, which specified wrong dev_t format
on 32bit.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@478 df820570-a93a-0410-bd06-b72b767a4274
1) Added debugging message in s3fs_getattr
If s3fs runs with "f2" option for deep debugging message, s3fs_getattr
puts debugging message as file's uid/gid/mode.
2) Added curldbg option
Added new option "curldbg" which is for debugging curl http/https
information.
It implements by CURLOPT_VERBOSE on curl_easy_setopt function.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@474 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed Issue 363
Fixed a bug which has below reason.
Fuse does not wait finishing "release file descriptor" function
called by fuse, and fuse runs(calls) next processing(commands).
Then s3fs could not clear stats cache information for that file
before calling next processing, and s3fs uses old stats cache
information.
So that, s3fs clears stats cache in release function at first.
And found two bad codes(but these codes do not influence normal
movement) in fdcache.cpp and fixed these.
Issue 363: make check failing inconsistently
git-svn-id: http://s3fs.googlecode.com/svn/trunk@471 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed Issue 321(#30)
Fixed a bug(mis-coding).
Issue 321(#30): no write permission for non-root user
2) Fixed Issue 365
Fixed a bug(mis-coding).
Issue 365: there is a logical error in s3fs-1.72 s3fs.cpp:2865
git-svn-id: http://s3fs.googlecode.com/svn/trunk@470 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug
Fixed bugs(mis-coding) which is wrong prototype for md5hexsum, md5sum functions.
Issue 361: complie time error after running #make
Issue 360: 1.72 Will not compile on Ubuntu 12.04.2 (precise) i686
And fixed a code for initializing enum member in S3fsCurl class.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@469 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug
s3fs was wrong for request retry processing so far.
It was fixed.
Probably, Issue 343(1.7 having curl 35 + other disconnect issue) is
occurred by this bug.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@468 df820570-a93a-0410-bd06-b72b767a4274
1) "virtual hosted-style request" for checking bucket
Old version calls "path-style request" for checking bucket at
initializing, then after this revision s3fs requests "virtual
hosted-style request".
This change is related to
"Operation not permitted - on any operation(Issue 362)".
2) Changed debugging message level
Changed debugging message level in prepare_url() from DPRNNN
to FPRNINFO.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@467 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed bugs
Fixes below bugs( format error and undefined fund ).
* 1.72 Will not compile on Ubuntu 12.04.2 (precise) i686(Issue 360)
* complie time error after running #make(Issue 361)
I'll close these Issue if I can confirm that these problem was solved.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@466 df820570-a93a-0410-bd06-b72b767a4274
1) Set metadata "Content-Encoding" automatically(Issue 292)
For this issue, s3fs is added new option "ahbe_conf".
New option means the configuration file path, and this file specifies
additional HTTP header by file(object) extension.
Thus you can specify any HTTP header for each object by extension.
* ahbe_conf file format:
-----------
line = [file suffix] HTTP-header [HTTP-header-values]
file suffix = file(object) suffix, if this field is empty,
it means "*"(all object).
HTTP-header = additional HTTP header name
HTTP-header-values = additional HTTP header value
-----------
* Example:
-----------
.gz Content-Encoding gzip
.Z Content-Encoding compress
X-S3FS-MYHTTPHEAD myvalue
-----------
A sample configuration file is uploaded in "test" directory.
If ahbe_conf parameter is specified, s3fs loads it's configuration
and compares extension(suffix) of object(file) when uploading
(PUT/POST) it. If the extension is same, s3fs adds/sends specified
HTTP header and value.
A case of sample configuration file, if a object(it's extension is
".gz") which already has Content-Encoding HTTP header is renamed
to ".txt" extension, s3fs does not set Content-Encoding. Because
".txt" is not match any line in configuration file.
So, s3fs matches the extension by each PUT/POST action.
* Please take care about "Content-Encoding".
This new option allows setting ANY HTTP header by object extension.
For example, you can specify "Content-Encoding" for ".gz"/etc
extension in configuration. But this means that S3 always returns
"Content-Encoding: gzip" when a client requests with other
"Accept-Encoding:" header. It SHOULD NOT be good.
Please see RFC 2616.
2) Changes about allow_other/uid/gid option for mount point
I reviewed about mount point permission and allow_other/uid/gid
options, and found bugs about these.
s3fs is fixed bugs and changed to the following specifications.
* s3fs only allows uid(gid) options as 0(root), when the effective
user is zero(root).
* A mount point(directory) must have a permission to allow
accessing by effective user/group.
* If allow_other option is specified, the mount point permission
is set 0777(all users allow all access).
In another case, the mount point is set 0700(only allows
effective user).
* When uid/gid option is specified, the mount point owner/group
is set uid/gid option value.
If uid/gid is not set, it is set effective user/group id.
This changes maybe fixes some issue(321, 338).
3) Changes a logic about (Issue 229)
The chmod command returns -EIO when changing the mount point.
It is correct, s3fs can not changed owner/group/mtime for the
mount point, but s3fs sends a request for changing the bucket.
This revision does not send the request, and returns EIO as
soon as possible.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@465 df820570-a93a-0410-bd06-b72b767a4274
1) Patch in support for special file and block device types( Issue 355 )
Patched codes, and s3fs can make special files on S3.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@460 df820570-a93a-0410-bd06-b72b767a4274
1 ) Fixed a bug
Since r458, s3fs uses stat files of cache files. But s3fs forgot removing these
stat files when s3fs removed cache files.
Fixed this bug.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@459 df820570-a93a-0410-bd06-b72b767a4274
* Summay
This revision includes big change about temporary file and local cache file.
By this big change, s3fs works with good performance when s3fs opens/
closes/syncs/reads object.
I made a big change about the handling about temporary file and local cache
file to do this implementation.
* Detail
1) About temporary file(local file)
s3fs uses a temporary file on local file system when s3fs does download/
upload/open/seek object on S3.
After this revision, s3fs calls ftruncate() function when s3fs makes the
temporary file.
In this way s3fs can set a file size of precisely length without downloading.
(Notice - ftruncate function is for XSI-compliant systems, so that possibly
you have a problem on non-XSI-compliant systems.)
By this change, s3fs can download a part of a object by requesting with
"Range" http header. It seems like downloading by each block unit.
The default block(part) size is 50MB, it is caused the result which is default
parallel requests count(5) by default multipart upload size(10MB).
If you need to change this block size, you can change by new option
"fd_page_size". This option can take from 1MB(1024 * 1024) to any bytes.
So that, you have to take care about that fdcache.cpp(and fdcache.h) were
changed a lot.
2) About local cache
Local cache files which are in directory specified by "use_cache" option do
not have always all of object data.
This cause is that s3fs uses ftruncate function and reads(writes) each block
unit of a temporary file.
s3fs manages each block unit's status which are "downloaded area" or "not".
For this status, s3fs makes new temporary file in cache directory which is
specified by "use_cache" option. This status files is in a directory which is
named "<use_cache sirectory>/.<bucket_name>/".
When s3fs opens this status file, s3fs locks this file for exclusive control by
calling flock function. You need to take care about this, the status files can
not be laid on network drive(like NFS).
This revision changes about file open mode, s3fs always opens a local cache
file and each status file with writable mode.
Last, this revision adds new option "del_cache", this option means that s3fs
deletes all local cache file when s3fs starts and exits.
3) Uploading
When s3fs writes data to file descriptor through FUSE request, old s3fs
revision downloads all of the object. But new revision does not download all,
it downloads only small percial area(some block units) including writing data
area.
And when s3fs closes or flushes the file descriptor, s3fs downloads other area
which is not downloaded from server. After that, s3fs uploads all of data.
Already r456 revision has parallel upload function, then this revision with
r456 and r457 are very big change for performance.
4) Downloading
By changing a temporary file and a local cache file, when s3fs downloads a
object, it downloads only the required range(some block units).
And s3fs downloads units by parallel GET request, it is same as a case of
uploading. (Maximum parallel request count and each download size are
specified same parameters for uploading.)
In the new revision, when s3fs opens file, s3fs returns file descriptor soon.
Because s3fs only opens(makes) the file descriptor with no downloading
data. And when s3fs reads a data, s3fs downloads only some block unit
including specified area.
This result is good for performance.
5) Changes option name
The option "parallel_upload" which added at r456 is changed to new option
name as "parallel_count". This reason is this option value is not only used by
uploading object, but a uploading object also uses this option. (For a while,
you can use old option name "parallel_upload" for compatibility.)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@458 df820570-a93a-0410-bd06-b72b767a4274
1) For uploading performance(part 2)
Changed a codes about uploading large object(multipart uploading).
This revision does not make temporary file when s3fs uploads large object by multipart uploading.
Before this revision, s3fs made temporary file(/tmp/s3fs.XXXXX) for multipart, but it was not good for performance.
So that, new codes do not use those files, and s3fs reads directly large object from s3fs's cache file.
2) Some value to symbol
Changed some value to symbol(define).
git-svn-id: http://s3fs.googlecode.com/svn/trunk@457 df820570-a93a-0410-bd06-b72b767a4274
1) For uploading performance(part 1)
Changed a code for large object uploading.
New codes makes s3fs send parallel requests when s3fs uploads large
object(20MB) by multipart post.
And added new "parallel_upload" option, which limits parallel request
count which s3fs requests at once.
This option's default value is "5", and you can change this value. But it
is necessary to set this value depending on a CPU and a network band.
s3fs became to work good performance by this option, please try to set
your value for this option.
2) Changes debugging messages
Changed debugging message in s3fs.cpp.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@456 df820570-a93a-0410-bd06-b72b767a4274
1) Changes a code in PutRequest function
Changed a code in S3fsCurl:: PutRequest function to duplicate file discriptor in
this function.
2) Changes debugging messages
Changed debugging message's indent in curl.cpp functions.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@455 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug
When something error occured in multipart uploading process, s3fs forgets to free memory.
(from r451)
Fixed this bug.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@454 df820570-a93a-0410-bd06-b72b767a4274
1) Option syntax verbosity in doc ( Issue 352 )
Before this revision(version), "use_rrs" option needs to set a parameter like "use_sse" option.
But this option does not need a parameter, specified "use_rrs" option means enabled RRS.
(because RRS is desabled by default.)
After this revision, "use_rrs" option can be specified without a parameter, and "use_sse" too.
Changed codes, man page and help page.
Please notice, for old version "use_rrs"(and "use_sse") can be specified with a parameter("1" or "0") yet.
2) Fixes a bug about analizing "use_sse" option.
Fixed a bug in r451, "use_sse" option is not worked because s3fs mistook to call function for "use_rrs".
3) Fixes a memory leak.
Fixed a memory leak in r451.
Fixed that the curl_slist_sort_insert() function forgot to free memory.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@452 df820570-a93a-0410-bd06-b72b767a4274
1) Adds new S3fsCurl class
Added new S3fsCurl class instead of directly calling curl function.
This class is lapping curl function for s3fs(AWS S3 API).
2) Changes codes about adding S3fsCurl class
Changed and deleted classes and structures which are related to curl in curl.cpp/curl.h.
Changed codes which are calling S3 API with curl in s3fs.cpp.
3) Deletes YKIES macro
Deleted YIKES macro, because this macro is used no more.
4) Changes a code
s3fs does not get good performance because s3fs copies each byte while downloading.
So that the codes is changed instead of memcpy, then s3fs performance not a little improves.
5) Fixes a bug
When s3fs renames a file, s3fs does not use the value which is specified by servicepath option.
Fixed this bug.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@451 df820570-a93a-0410-bd06-b72b767a4274
1) Changes FdCache class(cleanup codes)
The FdCache class is for caching file discriptor.
This class is modified as adding reference count for file discriptor and
removing pid for each path.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@450 df820570-a93a-0410-bd06-b72b767a4274
1) Changes codes for performance and request's costs
s3fs gets object's attributes by using HEAD request.
Directory objects is following 4 type:
a) name type is "dir", with meta information
b) name type is "dir", without meta information(but has files in itself)
c) name type is "dir/", with(out) meta information
d) name type is "dir_$folder$", with(out) meta information
The codes is changed to order checking directory object.
So that, s3fs decreases requests for checking objects.
Before version has a bug, that is s3fs can not be recognizable type-b)
definitely when s3fs check the object directly.(but s3fs can, when s3fs
check the object by listing)
This change fixes this bug.
2) Adds "multireq_max" option
Added "multireq_max" option is maximum number of parallel request
for listing objects.
This changes is possible to solve CURLE_COULDNT_CONNECT.
If this option can not solve it, this option will be useful for tuning
performance by each.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@449 df820570-a93a-0410-bd06-b72b767a4274
1) Not recognizing group permissions( Issue 346 )
Fixed umask option which works correctly.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@448 df820570-a93a-0410-bd06-b72b767a4274
1) don't use curl_slist directly
s3fs has auto_curl_slist struct, but some function use curl_slist directly in s3fs.cpp.
So that, changes codes for using auto_curl_slist.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@444 df820570-a93a-0410-bd06-b72b767a4274
1) Fixed a bug(forgot removing temporary files)
When s3fs gets a error from fwrite in multipart uploading function,
s3fs does not remove a temporary file.
2) Fixed a bug(wrong prototype of function)
The prototype of function for CURLSHOPT_UNLOCKFUNC
is wrong.
3) Changed codes
- In my_curl_easy_perform function, the codes for debugging messages
is changed, because it is for not working codes when "-d" option is
not specified.
- Changes struct head_data's member variables, and some codes for this
changes.
- Moving calling function to main for curl_global_init and curl_share_init
functions, because these function must call in main thread.
4) Fixed a bug(use uninitialized memory)
In get_lastmodified function, this function does not initialize value
(struct tm).
5) Fixed a bug(access freed variable)
In readdir_multi_head function, access a variable which is already freed.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@442 df820570-a93a-0410-bd06-b72b767a4274
1) Segmentation fault on connect on ppc64( Issue 342 )
The third parameter of curl_easy_getinfo() is wrong.
It must be "long" but specified "CURLcode".
Fixes this issue.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@440 df820570-a93a-0410-bd06-b72b767a4274
1) Patch adding support for SSE( Issue 226 )
Forgot changing codes for the error logic which use_sse and
use_rrs option is specified.
(r438 + this fixes = fixed issue 226)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@439 df820570-a93a-0410-bd06-b72b767a4274
1) Patch adding support for SSE( Issue 226 )
Supports SSE(Server-Side Encryption) and adds "use_sse" option.
* Specifications
When "use_sse" option is specified as "1", s3fs adds "x-amz-server-side-encryption"
header as "AES256".
But it only does when objects upload(writing object).
When you do chmod/chown/chgrp/touch/mv commands, s3fs does not
add this header and inherit SSE mode from oroginal object.
* Notice
"use_sse" option can not specify with "use_rrs" because we get signature
error from S3.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@438 df820570-a93a-0410-bd06-b72b767a4274
1) Fixes "SSL connect error"(curl 35 error)
Fixed "SSL connect error", then s3fs can connect by SSL with no problem.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@434 df820570-a93a-0410-bd06-b72b767a4274
1) problems with fseek and s3fs(Issue 241)
This problem is that s3fs returns file stat(size) when client already has opened file discriptor and client modifies file before saving fd.
So that, client adds bytes into file, but s3fs_getattr() function returns original size before changing.
Changes codes for that s3fs returns size from opened file discriptor, if client already opens the file.
* Changes s3fs.cpp
* Adds fdcache.cpp fdcache.h
git-svn-id: http://s3fs.googlecode.com/svn/trunk@432 df820570-a93a-0410-bd06-b72b767a4274
1) Fixes a bug
When the mount point is specified with sub-directory(mounting with
"bucket:/path"), internally all curl_multi head request in s3fs_readdir()
function failed.
This reason is that the head curl_multi request is not specified with
mount path.
This is a bug, and fixed.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@431 df820570-a93a-0410-bd06-b72b767a4274
1) Problems using encrypted connection to s3(Issue 235)
In s3fs_readdir() function, s3fs gets CURLE_COULDNT_CONNECT error when s3fs reads objects header information.
Probably, this problem is too many request in curl_multi request.
Then s3fs codes are changed:
* max request in curl_multi request is 500 and s3fs loops to call curl_multi.
* retries to call request which returns error as CURLE_COULDNT_CONNECT.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@430 df820570-a93a-0410-bd06-b72b767a4274
1) s3fs should cache DNS lookups?(Issue 304)
Changes that s3fs always uses own dns cache, and adds "nodnscache" option.
If "nodnscache" is specified, s3fs does not use dns cache as before.
s3fs keeps DNS cache for 60 senconds by libcurl's default.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@429 df820570-a93a-0410-bd06-b72b767a4274
1) Fixes a bug which object owner/group is set wrong id.
When do chown(chgrp) command without group(owner), s3fs set wrong id(-1)
for group(owner) id.
Fixes this bug.
2) The permission of mount point when allow_other option is specified.
When allow_other option is specified, s3fs forces the mount point directory
permission to set executable permission(mode | 0111).
3) Fixes a bug about permission
For example, when the directory permission is 0557, other user(who is not owner
and same group) gets a permission error when making file or directory in that dir.
Fixes this bug.
4) Compile error: blkcnt_t(Issue 340)
Fixes a bug: Compile error: blkcnt_t(Issue 340)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@428 df820570-a93a-0410-bd06-b72b767a4274
1) Supports uid/gid options
Fuse(and mount) option "uid" and "gid" is supported.
*) Fixes some issues
So these option are supported, some issue which are permission or access problem are solved.
ex. FIle permissions 000(Issue 337)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@424 df820570-a93a-0410-bd06-b72b767a4274
1) Adds enable_content_md5 option
When s3fs uploads large object(over 20MB), s3fs checks always ETag(MD5) in each multipart's response.
But for small objects, s3fs does not check MD5.
This new option enables for checking MD5 of uploading object.
If "enable_content_md5" option is specified, s3fs puts the object with "Content-MD5" header.
The checking MD5 value is not default, because it increases some of user's cpu usage.
(The default value may be replaced in the future.)
git-svn-id: http://s3fs.googlecode.com/svn/trunk@423 df820570-a93a-0410-bd06-b72b767a4274
1) s3sync'ed files not supported(Issue 31)
Supports HTTP headers which made by s3sync.
Supported new HTTP headers are x-amz-meta-owner,
x-amz-meta-permissions and x-amz-meta-group.
s3fs read and understand these headers, but s3fs
gives priority to s3fs's headers over these headers.
2) Cleanups codes
Cleanups some codes about issue 31.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@422 df820570-a93a-0410-bd06-b72b767a4274
1) Cannot Mount Path in Bucket(Issue 240)
Changes man page for this issue("bucket[:path]" -> "bucket[:/path]").
And so s3fs did not work with mount path, fixed it.
2) Fixes other bug about renaming directory
Fixes a bug caused by r420, which fails to rename directory.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@421 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) Fixes a bug
When the option max_stat_cache_size=0 is specified, the s3fs fails getting the attributes.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@418 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
1) Feature Request: Compatability with other S3FS clients(Issue: 27)
Supported the directory object which made by s3fox. Its name has "_$folder$" suffixes.
On s3fs, that directory object is listed normal directory name without "_$folder$".
You need careful when you change object attributes(rename, chmod, chown, touch), because the s3fs remakes the directory object after that object(which has "_$folder$" suffix)
After changing the object attributes, the object name does not have "_$folder$" suffix.
It means the object is remade by s3fs.
2) Other
Fixes bugs which are found when this issue is fixed.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@413 df820570-a93a-0410-bd06-b72b767a4274
1) Changes calling fread/fwrite logic(Issue: 320)
In conjunction with this issue, the opened file discripter is rewinded after reading/writing.
The put_local_fd() and get_localfd() function always returns rewinded fd.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@412 df820570-a93a-0410-bd06-b72b767a4274
1) Changes calling fread/fwrite logic(Issue: 320)
The s3fs functions are called by doing rsync command, the calling order is s3fs_create, s3fs_truncate, s3fs_flush.
After the s3fs_truncate uploads the file, the s3fs_flush uploads the file again wothout rewinding fd.
It is this issue bug, the s3fs_flush read EOF and put error.
Then I changes the code that is calling the lseek and seeking FD to head of file before fread/fwrite.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@411 df820570-a93a-0410-bd06-b72b767a4274
1) Unable to mount to a non empty directory(Issue: 265)
Supported "nonempty" fuse option.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@410 df820570-a93a-0410-bd06-b72b767a4274
1) Command line argument bucket: causes segv(Issue: 293)
If it specifies the bucket name which is terminated ":", s3fs run and crush(segv).
This bug is fixed.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@409 df820570-a93a-0410-bd06-b72b767a4274
1) Changes calling fread/fwrite logic(Issue: 320)
The calling fread/fwrite function logic is changed those in loop.
If the fread/fwrite returns 0 byte without a error, s3fs continue(retry) to read/write.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@408 df820570-a93a-0410-bd06-b72b767a4274
1) Changes for fixing a bug(Issue 328)
The return value in get_username() function is wrong value(NULL) when there is not user id in passwd file.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@404 df820570-a93a-0410-bd06-b72b767a4274
1) Changes for fixing a bug(r326)
The my_curl_easy_perform() function is not clearing the buffer(struct BodyStruct body) before retrying the request.
2) Other changes
In conjunction with this issue, the "struct BodyStruct" is changed to "Class BodyData".
New class is same as BodyStruct, but handling memory is automatically.
And added a argument for my_curl_easy_perform().
This function is needed the buffer pointer, but the arguments is only for body buffer.
Then I added the buffer pointer for header buffer.
3) Fixed memory leak
In get_object_name() function, there was a memory leak.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@403 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
1) Fixed a bug(r397)
After deleting directory object, s3fs could not make directory which was same name.
It was a bug about cache logic for compatibility other S3 client.
2) Cleaned up source codes(r396)
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@397 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
* This new version was made for fixing big issue about directory object.
Please be careful and review new s3fs.
==========================
List of Changes
==========================
1) Fixed bugs
Fixed some memory leak and un-freed curl handle.
Fixed codes with a bug which is not found yet.
Fixed a bug that the s3fs could not update object's mtime when the s3fs had a opened file descriptor.
Please let us know a bug, when you find new bug of a memory leak.
2) Changed codes
Changed codes of s3fs_readdir() and list_bucket() etc.
Changed codes so that the get_realpath() function returned std::string.
Changed codes about exit() function. Because the exit() function is called from many fuse callback function directly, these function called fuse_exit() function and retuned with error.
Changed codes so that the case of the characters for the "x-amz-meta" response header is ignored.
3) Added a option
Added the norenameapi option for the storage compatible with S3 without copy API.
This option is subset of nocopyapi option.
Please read man page or call with --help option.
4) Object for directory
This is very big and important change.
The object of directory is changed "dir/" instead of "dir" for being compatible with other S3 client applications.
And this version understands the object of directory which is made by old version.
If the new s3fs changes the attributes or owner/group or mtime of the directory object, the s3fs automatically changes the object from old object name("dir") to new("dir/").
If you need to change old object name("dir") to new("dir/") manually, you can use shell script(mergedir.sh) in test directory.
* About the directory object name
AWS S3 allows the object name as both "dir" and "dir/".
The s3fs before this version understood only "dir" as directory object name, but old version did not understand the "dir/" object name.
The new version understands both of "dir" and "dir/" object name.
The s3fs user needs to be care for the special situation that I mentioned later.
The new version deletes old "dir" object and makes new "dir/" object, when the user operates the directory object for changing the permission or owner/group or mtime.
This operation does on background and automatically.
If you need to merge manually, you can use shell script which is mergedir.sh in test directory.
This script runs chmod/chown/touch commands after finding a directory.
Other S3 client application makes a directory object("dir/") without meta information which is needed to understand by the s3fs, this script can add meta information for a directory object.
If this script function is insufficient for you, you can read and modify the codes by yourself.
Please use the shell script carefully because of changing the object.
If you find a bug in this script, please let me know.
* Details
** The directory object made by old version
The directory object made by old version is not understood by other S3 client application.
New s3fs version was updated for keeping compatibility with other clients.
You can use the mergedir.sh in test directory for merging from old directory object("dir") to new("dir/").
The directory object name is changed from "dir" to "dir/" after the mergedir.sh is run, this changed "dir/" object is understood by other S3 clients.
This script runs chmod/chown/chgrp/touch/etc commands against the old directory object("dir"), then new s3fs merges that directory automatically.
If you need to change directory object from old to new manually, you can do it by running these commands which change the directory attributes(mode/owner/group/mtime).
** The directory object made by new version
The directory object name made by new version is "dir/".
Because the name includes "/", other S3 client applications understand it as the directory.
I tested new directory by s3cmd/tntDrive/DragonDisk/Gladinet as other S3 clients, the result was good compatibility.
You need to know that the compatibility has small problem by the difference in specifications between clients.
And you need to be careful about that the old s3fs can not understand the directory object which made by new s3fs.
You should change all s3fs which accesses same bucket.
** The directory object made by other S3 client application
Because the object is determined as a directory by the s3fs, the s3fs makes and uses special meta information which is "x-amz-meta-***" and "Content-Type" as HTTP header.
The s3fs sets and uses HTTP headers for the directory object, those headers are listed below.
Content-Type: application/x-directory
x-amz-meta-mode: <mode>
x-amz-meta-uid: <UID>
x-amz-meta-gid <GID>
x-amz-meta-mtime: <unix time of modified file>
Other S3 client application builds the directory object without attributes which is needed by the s3fs.
When the "ls" command is run on the s3fs-fuse file system which has directories/files made by other S3 clients, this result is shown below.
d--------- 1 root root 0 Feb 27 11:21 dir
---------- 1 root root 1024 Mar 14 02:15 file
Because the objects don't have meta information("x-amz-meta-mode"), it means mode=0000.
In this case, the directory object is shown only "d", because the s3fs determines the object as a directory when the object is the name with "/" or has "Content-type: application/x-directory" header.
(The s3fs sets "Content-Type: application/x-directory" to the directory object, but other S3 clients set "binary/octet-stream".)
In that result, nobody without root is allowed to operate the object.
The owner and group are "root"(UID=0) because the object doesn't have "x-amz-meta-uid/gid".
If the object doesn't have "x-amz-meta-mtime", the s3fs uses "Last-Modified" HTTP header.
Therefore the object's mtime is "Last-Modified" value.(This logic is same as old version)
It has been already explained, if you need to change the object attributes, you can do it by manually operation or mergedir.sh.
* Example of the compatibility with s3cmd etc
** Case A) Only "dir/file" object
One of case, there is only "dir/file" object without "dir/" object, that object is made by s3cmd or etc.
In this case, the response of REST API(list bucket) with "delimiter=/" parameter has "CommonPrefixes", and the "dir/" is listed in "CommonPrefixes/Prefix", but the "dir/" object is not real object.
The s3fs needs to determine this object as directory, however there is no real directory object("dir" or "dir/").
But both new s3fs and old one does NOT understand this "dir/" in "CommonPrefixes", because the s3fs fails to get meta information from "dir" or "dir/".
On this case, the result of "ls" command is shown below.
??????????? ? ? ? ? ? dir
This "dir" is not operated by anyone and any process, because the s3fs does not understand this object permission.
And "dir/file" object can not be shown and operated too.
Some other S3 clients(tntDrive/Gladinet/etc) can not understand this object as same as the s3fs.
If you need to operate "dir/file" object, you need to make the "dir/" object as a directory.
To make the "dir/" directory object, you need to do below.
Because there is already the "dir" object which is not real object, you can not make "dir/" directory.
(s3cmd does not make "dir/" object because the object name has "/".).
You should make another name directory(ex: "dir2/"), and move the "dir/file" objects to in new directory.
Last, you can rename the directory name from "dir2/" to "dir/".
** Case B) Both "dir" and "dir/file" object
This case is that there are "dir" and "dir/file" objects which were made by s3cmd/etc.
s3cmd and s3fs understand the "dir" object as normal(file) object because this object does not have meta information and a name with "/".
But the result of REST API(list bucket) has "dir/" name in "CommonPrefixes/Prefix".
The s3fs checks "dir/" and "dir" as a directory, but the "dir" object is not directory object.
(Because the new s3fs need to compatible old version, the s3fs checks a directory object in order of "dir/", "dir")
In this case, the result of "ls" command is shown below.
---------- 1 root root 0 Feb 27 02:48 dir
As a result, the "dir/file" can not be shown and operated because the "dir" object is a file.
If you determine the "dir" as a directory, you need to add mete information to the "dir" object by s3cmd.
** Case C) Both "dir" and "dir/" object
Last case is that there are "dir" and "dir/" objects which were made by other S3 clients.
(example: At first you upload a object "dir/" as a directory by new 3sfs, and you upload a object "dir" by s3cmd.)
New s3fs determines "dir/" as a directory, because the s3fs searches in oder of "dir/", "dir".
As a result, the "dir" object can not be shown and operated.
** Compatibility between S3 clients
Both new and old s3fs do not understand both "dir" and "dir/" at the same time, tntDrive and Galdinet are same as the s3fs.
If there are "dir/" and "dir" objects, the s3fs gives priority to "dir/".
But s3cmd and DragonDisk understand both objects.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@392 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
2) Added a static table for file discriptors and paths which is keeped until closing.
The s3fs_xxxx function called by FUSE is able to use a file disctiptor which is already opened by s3fs_open function.
3) The mknod is changed that it always return error, because it does not work through a network.
4) The symbolic file attribute changed to S_IFLNK | S_IRWXU | S_IRWXG | S_IRWXO.
5) Fixed the truncate function to work.
6) The mkdir and clone_directory_object functions are simplified and are changed to use the common create_directory_object function for these.
For fixed a bug that the directory's PID/UID/mode are changed when these are renamed.
7) The get_object_name function is changed to check a object finely.
8) The s3fs_check_service function is changed for "301" response code.
9) Added the noxmlns option for a case of the response without xmlns field. (for the storage compatible with S3)
10) Added the nocopyapi option for the storage compatible with S3 without copy API.
* Comments
No.9 and No.10 are for the storage compatible with AWS S3.
Both option are unnecessary options for AWS S3.
In future, for the s3fs's promotion and possibility I would like to add new function.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@384 df820570-a93a-0410-bd06-b72b767a4274
- items with an initial hit count of 0 would not be deleted
Added an additiional integration test
git-svn-id: http://s3fs.googlecode.com/svn/trunk@383 df820570-a93a-0410-bd06-b72b767a4274
This _should_ handle issue #153 alongside simplifying s3fs_check_service;
determining if the network is up/down duplicated a lot of functionality
availble in my_curl_easy_perform. This will need some testing, of course.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@374 df820570-a93a-0410-bd06-b72b767a4274
Modified rename_object and put_headers to handle objects larger than
5GB. Files larger than 5GB are required to use the multi interface.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@363 df820570-a93a-0410-bd06-b72b767a4274
Passing s3fs through valgrind revealed a few more memory leaks assocated with
the fuse option parser. We'll no longer directly return main from fuse_main().
In the event that s3fs_check_service failed, many of the curl handles were not
being cleaned up properly.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@362 df820570-a93a-0410-bd06-b72b767a4274
running s3fs through several valgrind checks found a bug in s3fs_check_service()
git-svn-id: http://s3fs.googlecode.com/svn/trunk@361 df820570-a93a-0410-bd06-b72b767a4274
simply using strstr to see if the bucket is available.
removed the check to see if the service has any buckets at all.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@360 df820570-a93a-0410-bd06-b72b767a4274
when s3fs is linked against libcurl < 7.20.0 we'd receive CURLM_CALL_MULTI_PERFORM
git-svn-id: http://s3fs.googlecode.com/svn/trunk@358 df820570-a93a-0410-bd06-b72b767a4274
complete s3fs_readdir() refactor
- multi interface now batches HTTP requests
- proper HTTP KeepAlive sessions are back! (CURLOPT_FORBID_REUSE is no longer required)
- use xpath to quickly grab xml nodes
- lots of cleanup
- fixes some strange stat cache behavior
- huge readdir performance benefits (8-14x in my case) on large directories
git-svn-id: http://s3fs.googlecode.com/svn/trunk@348 df820570-a93a-0410-bd06-b72b767a4274
- fixed a bug in the file cache, it was attempting to set the mtime
on symlinks
- general code cleanup; moved some string functions to string_util.cpp
git-svn-id: http://s3fs.googlecode.com/svn/trunk@345 df820570-a93a-0410-bd06-b72b767a4274
curl error code 23 - CURLE_WRITE_ERROR
When encountered, it does a retry.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@329 df820570-a93a-0410-bd06-b72b767a4274
- s3fs_flush() now checks to see whether the file on the remote end is the same as the local copy.
- md5sum() now requires a file descriptor instead of a path.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@322 df820570-a93a-0410-bd06-b72b767a4274
Functional changes are limited to the multipart upload process. Each uploaded part is now verified against a local md5sum.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@318 df820570-a93a-0410-bd06-b72b767a4274
- increase max_keys in readdir from 50 to 500
- handle the curle_couldnt_resolve_host error better
- add the curl forbid reuse option
git-svn-id: http://s3fs.googlecode.com/svn/trunk@308 df820570-a93a-0410-bd06-b72b767a4274
Beginning of s3fs "utility" mode - initially -u option
just reports in progress multipart uploads for the
bucket. Eventually this mode could be used for
other S3 tasks not accessible through typical
file system operations
For multipart upload, use safer mkstemp() instead
of tmpnam() for temporary file
Increased the curl connect and readwrite timeouts
to 10 and 30 seconds respectively.
Autodetect when a big file is being uploaded,
increase the readwrite timeout to 120 seconds. This
was found through experimentation. When uploading
a big file, it is suspected that time is needed
for S3 to assemble the file before it is available
for access. It was found that when a large file
was uploaded via rsync, the final mtime and
chmod modifications were timing out, even though
the upload itself was successful.
Multipart upload is ready for use. A couple of
error checks are still needed in the function and
some cleanup. Need some feedback on how it
is working though.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@298 df820570-a93a-0410-bd06-b72b767a4274
Check issue #142 for details
Code is operational, but not quite ready for
prime time -- needs some clean up
git-svn-id: http://s3fs.googlecode.com/svn/trunk@297 df820570-a93a-0410-bd06-b72b767a4274
Implemented create() function - Resolves issue #18
Issues will be updated with more detail.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@289 df820570-a93a-0410-bd06-b72b767a4274
refactoring easier and the code easier to understand (for me anyway)
Opened up the VERIFY macro so that memory cleanup can be done
before returning from a function.
Make the file descriptor function calls a bit more robust,
check the return codes.
Current code tested on Debian sid, CentOS (with FUSE 2.84) and Ubuntu 10.10
git-svn-id: http://s3fs.googlecode.com/svn/trunk@286 df820570-a93a-0410-bd06-b72b767a4274
No tarball until further testing on other platforms.
Extensively tested on Debian sid 64bit
Resolves issue #104
git-svn-id: http://s3fs.googlecode.com/svn/trunk@285 df820570-a93a-0410-bd06-b72b767a4274
re-wrote the curl write-to-memory callback function
(this helped eliminate a memory leak)
eliminated another memory leak
more debug messages
git-svn-id: http://s3fs.googlecode.com/svn/trunk@281 df820570-a93a-0410-bd06-b72b767a4274
code with CURLE_OK is returned.
clean up a few debug/stdout messages
This commit doesn't really fix anything, but eliminates
the suspicous HTTP 404 errors from the syslog -- these are
usually normal
git-svn-id: http://s3fs.googlecode.com/svn/trunk@280 df820570-a93a-0410-bd06-b72b767a4274
Rather than erroring out, it is treated like the
CURLE_OPERATION_TIMEOUT in that it doesn't exit the
timeout loop while the retry count is > 0. I
also added a short duration sleep to not retry
immediately.
Resolves issue #132
git-svn-id: http://s3fs.googlecode.com/svn/trunk@277 df820570-a93a-0410-bd06-b72b767a4274
return for more specific information as to why the communication
failed. Most common reasons are the "time too skewed" or
credentials failure.
This could be extended to the curl routine that is used
during normal operation. However, the check_service routine
is a good first pass.
Resolves issue #133
git-svn-id: http://s3fs.googlecode.com/svn/trunk@275 df820570-a93a-0410-bd06-b72b767a4274
sure of the usefulness or purpose of this option, but
am including it for completeness
Re-categorized SYS_INFO messages ot SYS_DEBUG messages
to reduce the amount of spew into syslog -- these can
be turned back on with the -d option
Resolves issue #120
git-svn-id: http://s3fs.googlecode.com/svn/trunk@274 df820570-a93a-0410-bd06-b72b767a4274
defined. Added #defines around appropriate code.
Latest revision now compiles and works on CentOS
git-svn-id: http://s3fs.googlecode.com/svn/trunk@271 df820570-a93a-0410-bd06-b72b767a4274
expose the curl compiled with openssl vs. nss issue.
If the issue is seen, emit an informational message
and give the user an option to over-ride checking of
the hostname -- it's recommended not to use bucket
names with periods and https
As implied, added an option ssl_verify_hostname=[0|1]
Tested on fedora 14. Will check on Ubuntu/Debian/CentOS
after check in.
Resolves issue #128
git-svn-id: http://s3fs.googlecode.com/svn/trunk@270 df820570-a93a-0410-bd06-b72b767a4274
trapping the CURLE_SSL_CACERT error and trying to automatically
correct it.
Tested on CentOS 5.5 and ensured that Debian/Ubuntu doesn't break
because of this. This only applies to the https usage.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@269 df820570-a93a-0410-bd06-b72b767a4274
During the service_check() function, if curl returns
a CURLE_SSL_CACERT error then report it and do not
start the s3fs service.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@265 df820570-a93a-0410-bd06-b72b767a4274
rename (mv) a directory, its contents "disappear". To
get the contents back, just re-create the directory.
This issue has led to more than one support issues.
This patch disallows renaming of directories and
returns a operation not supported message, e.g.
% mv dir1 dir2
mv: cannot move `dir1' to `dir2': Operation not supported
Another observation is that when a directory was renamed
it loses its directory status and becomes a normal file.
This is a first step to allow for supporting directory
renames.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@260 df820570-a93a-0410-bd06-b72b767a4274
is not present/readable.
Don't process blank lines in mime.types
There wasn't an issue seen with this, just
cleaning up the code a bit.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@245 df820570-a93a-0410-bd06-b72b767a4274
Resolves issue #88
Specifying credentials on the command line is no longer
supported. There are several other ways to do this now.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@243 df820570-a93a-0410-bd06-b72b767a4274
with the conversion to get_opt
-f is passed along to FUSE. This makes FUSE run
in foreground (non-daemon) mode and some debugging
messages now appear on STDOUT
git-svn-id: http://s3fs.googlecode.com/svn/trunk@240 df820570-a93a-0410-bd06-b72b767a4274
directory from the trunk directory.
First do a svn cp of all of the source up to
trunk. This is supposed to preserve change
history -- we'll see.
The source remains untouched until this gets
worked out.
Also in preparation of bringing in the source
collateral for the debian package into the
repository. I expect that the top level will
look like this:
svn/
s3fs/
trunk/
tags/
branches/
dpkg/
trunk/
tags/
branches/
So far that's how it is looking. I'll be
very careful to ensure integrity of the data.
As a result this may be a multistep process.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@236 df820570-a93a-0410-bd06-b72b767a4274