Previously s3fs had a race condition where one client could delete
FdEntity that another client was using. Add a simple concurrent test
which previously failed but now succeeds. Fixes#964.
Workers now notify the master thread when they complete, unifying the
Linux and macOS code paths. This also avoids excessive
pthread_tryjoin_np calls. Follows on to
88cd8feb05.
S3 can copy multipart much faster than single part due to IO
parallelization. Renaming a 4 GB file reduces from 72 to 20 seconds
with bigger gains with larger files.
Previously s3fs would issue a batch of HEAD requests and wait for all
to succeed before issuing the next batch. Now it issues the first
batch and only waits for a single call to succeed before issuing the
next call. This can improve performance when one call lags due to
network errors. I measured 25% improvement with the same level of
parallelism. This commit also reparents parallelism knobs for
consistency. Follows on to 88cd8feb05.
Fixes#223.
This matches the configuration from popular tools like AWS CLI and
allows multiple profile names via -o profile=name. The existing
credential mechanisms continue to work. Fixes#822.
the original implementation in get_base_exp() depends on the order of xml return from the server.
patriotically, when listing a directory with sub directory(s), the xml document response contains more than 2 <Prefix> nodes(some of them are in <CommonPrefixes> node).
the source code arbitrarily select the first one in the documents (nodes->nodeTab[0]->xmlChildrenNode).
some s3 compatible service return the list-bucket result in different result, leading the s3fs to a wrong behavior
This protects private data when used over the public Internet. Users
can opt-in to unencrypted HTTP if they need additional performance on
a local network. Fixes#282.
Using "mount -a" fails for already-mounted s3fs directories,
because s3fs mount arguments don't match the form in /etc/mtab.
Calling "mount -a" should quietly succeed when a directory is
already mounted.
To fix this, accept mount commands of the form:
s3fs s3fs /srv/object-store -o bucket=mybucket
or in /etc/fstab form:
s3fs /srv/object-store fuse.s3fs bucket=mybucket 0 0
This matches the form in /etc/mtab and allows "mount -a" to
work properly.
When using an instance with an IAM Role, transient credentials can be
found in http://169.254.169.254/latest/meta-data/ at
iam/security-credentials/role-name and s3fs tries to do this. However,
it is using the profile-name where role-name is needed. In many cases
the role and profile name are the same, but they are not always.
The simplest way to find the role name appears to be to GET
http://169.254.169.254/latest/meta-data/iam/security-credentials/
itself, which returns a listing of the role names for which temporary
credentials exist. (I think there will probably only be one, but we
probably want to split on newlines and take the first one here in case
that assumption is not valid). This is the approach the AWS SDK appears
to use (based on WireShark analysis).
Bug: https://github.com/s3fs-fuse/s3fs-fuse/issues/421
Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
If user specifies iam_role=auto (or just iam_role), credentials will not
be loaded during early phase, so skip credential checks there.
Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
For ListBucketResult on an empty directory, AWS S3 and S3Proxy 1.4
differ. AWS will match the directory name, S3Proxy does not.
Changing max-keys=1 to max-keys-2 works for both implementations.
append_objects_from_xml() will swallow the directory key. The log
level of this message is changed from ERROR to DBG.
Fixes#345
These system calls take an extra 'position' parameter on OS X. A
non-zero position value is only valid for resource forks (the Darwin
VFS layer will reject anything else with EINVAL); this patch simply
adds and ignores the parameter on Apple platforms.
Allows building against OSXFUSE.
change the minimum version of fuse required. Change the
checkers to use a variable for the minimum fuse version
instead of it being hardcoded in four different places.
src/s3fs.cpp: Use __APPLE__ define around fuse code that
is offensive to osxfuse. Not including the code doesn't
seem to matter.
Buckets with mixed-case names can't be accessed with the virtual-hosted
style API due to DNS limitations. S3FS has an option for
pathrequeststyle which is used for the URL, but it was not applied when
building the endpoint passed through the Host header. Fix this, and
relax the validation on bucket names when using this style.
See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
nautilus does this when you drag and drop to overwrite a file:
1) create .goutputstream-XXXXXX to write to
2) fsync the fd for .goutputstream-XXXXXX
3) rename .goutputstream-XXXXXX to target file
4) close the fd for .goutputstream-XXXXXX
previously, doing this on s3fs would result in an empty target file
because after the rename, s3fs would not flush the content of
.goutputstream-XXXXXX to target file.
this change moves the FdEntity from the old path to the new path
whenever rename happens. On flush s3fs would now flush the correct
content to the rename target.
Rather than using virtual host style requests, path style requests can be used
instead.
i.e. rather than bucketname.s3.amazon.com/... the s3fs will be able to request
from s3.amazon.com/bucketname/...
This is useful for S3 compatible APIs which don't support the virtual host style
request.
It is enabled with the new option, `use_path_style_request`.
Example:
/usr/bin/s3fs data ~/netcdf -o url="https://swift.rc.nectar.org.au:8888/" -o use_path_request_style -o allow_other -o uid=500 -o gid=500
* 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
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 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 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