Commit Graph

226 Commits

Author SHA1 Message Date
Andrew Gaul
d375bca0d0 Correct typos 2016-11-19 15:57:41 -08:00
Takeshi Nakatani
7fabd18b1f Trim symbolic link original path in file. 2016-10-11 10:22:30 +00:00
Takeshi Nakatani
5db369d67e Trim symbolic link original path in file. 2016-10-11 10:17:46 +00:00
Takeshi Nakatani
dba32fdf78 Trim symbolic link original path in file. 2016-10-11 10:06:21 +00:00
Takeshi Nakatani
9fd1368611 OS-specific correspondence of the extended attribute header 2016-10-02 07:23:19 +00:00
Takeshi Nakatani
65d52506c4 Added use_xattr option for #467 and #460 2016-09-19 04:28:01 +00:00
Takeshi Nakatani
1a96f40a10 Fixed a bug about could not copy file mode from org file 2016-09-11 13:09:23 +00:00
Takeshi Nakatani
1ddc14d59d Changed for accepting mount options compatible with mtab - #449 2016-07-24 08:17:58 +00:00
Peter Watkins
a19206cf0f Accept mount arguments compatible with mtab
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.
2016-07-13 17:23:33 -04:00
Andrew Gaul
320b8e1171 Include location constraint when creating bucket
This allows creating buckets in non-default regions.  Also improve
do_create_bucket error handling.
2016-06-13 10:35:37 -07:00
Nathaniel W. Turner
584ea488bf Use role name instead of profile name when iam_role=auto
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>
2016-05-24 13:34:19 -04:00
Nathaniel W. Turner
594c9ca7d2 Skip early credential checks when iam_role=auto
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>
2016-05-20 12:49:02 -04:00
Takeshi Nakatani
50f1ad51c8 loading IAM role name automatically(iam_role option) - #387 2016-05-06 04:37:32 +00:00
Takeshi Nakatani
1ddbd4d6bb Fixed 'load_sse_c' option not working - #388 2016-05-06 00:36:54 +00:00
Takeshi Nakatani
10589a9497 Supported User-Agent header - #383 2016-04-17 07:44:03 +00:00
Takeshi Nakatani
67efc11d94 Always set stats cache for opened file 2016-03-13 05:43:28 +00:00
Takeshi Nakatani
c7cf86c2ef Sepalated AdditionalHeader class from curl.* 2016-02-07 05:41:56 +00:00
Takeshi Nakatani
150b83f61e Remove stat file cache dir if specified del_cache - #337 2016-02-06 18:59:13 +00:00
Takeshi Nakatani
c5a94cfc0c Check cache dirctory path and attributes - #347 2016-02-06 13:38:48 +00:00
Robb Kistler
4eff6b4dd1 Fix empty directory check against AWS S3
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
2016-02-04 23:13:00 -08:00
Andrew Gaul
e003732f18 Address various clang warnings
Found with:

-Wc++11-extensions
-Wc++11-extra-semi
-Wmissing-variable-declarations
-Wundef
2016-01-11 00:52:24 -08:00
Takeshi Nakatani
ea151a70c4 Merge pull request #321 from mcellis33/320
320: delete stat cache entry in s3fs_fsync so st_size is refreshed
2015-12-20 15:05:28 +09:00
Mark Ellis
163daa5de1 320: delete stat cache entry in s3fs_fsync so st_size is refreshed 2015-12-18 15:39:25 -08:00
Robb Kistler
b581290c30 Cleanly exit fuse loop on error in s3fs_init
This allows FUSE to clean the mount point up, preventing
"Transport endpoint not connected" errors on subsequent
access to the mount.
2015-12-15 15:25:56 -08:00
Robb Kistler
8e688816d4 Change error log to debug log in s3fs_read() 2015-12-03 21:25:27 -08:00
Takeshi Nakatani
7b62de80f6 Fixed a bug about mtime - #299 2015-11-29 15:53:53 +00:00
Takeshi Nakatani
c673d9d935 File opened with O_TRUNC is not flushed - changed #291 2015-11-08 04:55:17 +00:00
Robb Kistler
dd7d9268f2 Force flush in s3fs_open() if file is truncated. 2015-11-03 22:06:25 -08:00
Takeshi Nakatani
8dd234dd8f Fixed bugs about cppcheck error 2015-10-20 15:47:07 +00:00
Takeshi Nakatani
83d46ef8c6 Fixed bugs about a object larger than free disk space 2015-10-20 15:19:04 +00:00
Takeshi Nakatani
d102eb752d Supported a object which is larger than free disk space 2015-10-18 17:03:41 +00:00
Takeshi Nakatani
f51ad1f33e Supported for SSE KMS 2015-10-06 14:46:14 +00:00
Takeshi Nakatani
92e52dadd4 Changed and cleaned the logic for debug message. 2015-09-30 19:41:27 +00:00
Andrew Gaul
785ed642ba Add support for standard_ia storage class
This enables storage with lower at-rest prices, higher request prices,
and lower availability.  Also rework existing reduced redundancy
parsing into a more generic storage class.  More background on
standard_ia:

https://aws.amazon.com/blogs/aws/aws-storage-update-new-lower-cost-s3-storage-option-glacier-price-reduction/
2015-09-17 13:35:25 -07:00
Takeshi Nakatani
ce66430fac Added chacking cache dir perms at starting. 2015-08-23 03:57:34 +00:00
Takeshi Nakatani
751c868769 s3fs can print version with short commit hash - #228 2015-08-21 16:19:31 +00:00
Takeshi Nakatani
a3e820e733 Merge pull request #245 from andrewgaul/map-duplicate-lookups
Elide duplicate lookups of std::map via iterators
2015-08-20 01:22:06 +09:00
Andrew Gaul
67d1576dfb Elide duplicate lookups of std::map via iterators
Also remove use of C++11 std::map::at.
2015-08-18 14:00:42 -07:00
Andrew Gaul
c0b21d8808 Enable all cppcheck rules 2015-08-16 17:13:24 -07:00
Takeshi Nakatani
756d1e5e81 Configure cppcheck #224 2015-08-12 15:04:16 +00:00
Takeshi Nakatani
49e32967ec Merge pull request #219 from andrewgaul/coverity
Address Coverity errors
2015-08-12 23:40:47 +09:00
Andrew Gaul
ff8a0c2eea Parse ETag from copy multipart correctly
Previously s3fs misparsed this, preventing renames of files larger
than 5 GB.  Integration test disabled until S3Proxy 1.5.0 is released.
2015-08-11 14:43:35 -07:00
Andrew Gaul
8ee71caabb Address Coverity errors
Fixed an uninitialized member, misordered NULL check, resource leak,
and unconsumed return value.
2015-08-05 23:28:06 -07:00
Jamie Alessio
912bc58df0 Fixed a few small spelling issues. 2015-07-10 11:50:40 -07:00
Nate Rosenblum
9b3c87ec97 Specialize {set,get}xattr for OS X
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.
2015-06-25 12:56:15 -07:00
Takeshi Nakatani
966d229787 fixed fallback to sigv2 for bucket create and GCS 2015-06-20 04:34:32 +00:00
Takeshi Nakatani
ad8c64104e Merge pull request #199 from s3fs-fuse/xattr
Supported extended attributes(retry)
2015-06-20 11:46:47 +09:00
Takeshi Nakatani
fe3abed9f0 Chaged codes about iterator etc 2015-06-13 03:27:07 +00:00
Takeshi Nakatani
0ecf4aa6b4 Chaged codes about iterator 2015-06-13 03:08:56 +00:00
Takeshi Nakatani
84fb3d83d8 Fixed xattr for binary value 2015-06-06 16:39:39 +00:00