Commit Graph

566 Commits

Author SHA1 Message Date
Andrew Gaul
e650d8c55c
Explicitly handle CommonPrefixes with nocompat_dir (#2212)
Previously the test missed listing implicit directories and another
test was incorrect.  This fixes a regression from 1.91.
2023-07-13 21:15:34 +09:00
Takeshi Nakatani
b2537052ef Fixed data race in threads found thread sanitizer 2023-07-09 20:53:27 +09:00
LiuBingrun
a8edbd8622
fix streamuplod not working (#2204)
fuse_main will do fork to daemonize. if ThreadPool is created before
this, worker thread will not be placed in child process.

Move ThreadPool Init to s3fs_init and destory to s3fs_destory.

Signed-off-by: liubingrun <liubr1@chinatelecom.cn>
2023-07-02 10:56:59 +09:00
Alex Fishman
03066ea29a
Fix extended attribute support when using FUSE-T (#2201)
* Add support for FUSE-T on macos

Signed-off-by: Alex Fishman <alex@fuse-t.org>
Signed-off-by: alex <alex@alex-NUC10.lan>

* Ignore value pointer when size is zero on setattrx

Signed-off-by: Alex Fishman <alex@fuse-t.org>

---------

Signed-off-by: Alex Fishman <alex@fuse-t.org>
Signed-off-by: alex <alex@alex-NUC10.lan>
2023-06-26 22:05:37 +09:00
Takeshi Nakatani
1fc0e52dc3 Fixed mount point stat flag to be thread safe 2023-05-21 13:46:06 +09:00
Andrew Gaul
59c3b26655
Fix clang-tidy 16 nits (#2158) 2023-05-14 01:59:26 +09:00
Takeshi Nakatani
8296fe32cb
Directly and simplify requests in mount point checks (#2155) 2023-05-14 01:29:24 +09:00
Takeshi Nakatani
ca9a257eec
Allow mount points without directory objects by compat_dir (#2153) 2023-05-07 09:15:27 +09:00
Takeshi Nakatani
6d4bb59865
Corresponded to upload in case of calling release without flush (#2150) 2023-04-23 22:59:04 +09:00
Ottavia Balducci
9b75abfbe6
New option: bucket_size (#2148)
* Added bucket_size option
2023-04-23 14:04:38 +09:00
Takeshi Nakatani
c4f95f14cb
Fixed a bug about attributes of mount point (#2147) 2023-04-15 14:34:39 +09:00
Takeshi Nakatani
9c74014443
Fixed a bug in handling file names containing CR(0x1D) (#2136) 2023-03-26 13:19:16 +09:00
Takeshi Nakatani
a25cb9e07a
Fixed a bug when reading a reduced file without flushing (#2133) 2023-03-26 11:45:21 +09:00
Takeshi Nakatani
9648eba5bb
Changed to rename cache files when renaming large files (#2135) 2023-03-21 14:15:34 +09:00
Takeshi Nakatani
a25a9450a6
Fixed to fail when the mount point directory is not existed (#2114) 2023-03-05 13:03:48 +09:00
Takeshi Nakatani
f8a825e9b9
multipart upload id is converted by url encode (#2097) 2023-02-18 11:40:25 +09:00
Takeshi Nakatani
e715b77307
Added the function to update mtime/ctime of the parent directory (#2016) 2023-02-12 17:59:40 +09:00
Takeshi Nakatani
d1388ff446 Added proxy and proxy_cred_file option 2023-02-08 21:53:34 +09:00
Takeshi Nakatani
16bc44948e Retry BucketCheck containing directory paths 2023-01-09 21:18:47 +09:00
Takeshi Nakatani
e4f85c1e08 Fixed renaming bug with SSE 2023-01-09 21:17:48 +09:00
Andrew Gaul
0ba49518e9
Make some methods and parameters const (#2078)
This requires making some locks mutable.
2023-01-04 20:23:39 +09:00
Takeshi Nakatani
465986e397
Fixed a bug when end of path for mount point is multi slash (#2057) 2022-11-19 15:07:27 +09:00
Takeshi Nakatani
2e77920943
Added support for xattr as POSIX ACL (#2039) 2022-10-22 21:48:02 +09:00
Takeshi Nakatani
4a813aec42
Support the object under no directory object path by compat_dir (#2023) 2022-10-22 15:12:00 +09:00
Takeshi Nakatani
4304ec63bb
Added stat information to the mount point (#1964) 2022-10-22 11:46:13 +09:00
Takeshi Nakatani
6e89e69bba
Enabled to load shared library for Credential and Token (#1927) 2022-10-22 10:42:07 +09:00
Takeshi Nakatani
238fc0799e Fixed statfs(free inodes) for macos 2022-09-25 17:10:37 +09:00
Takeshi Nakatani
e654e8ec8a Removed const_cast in set_bucket 2022-07-30 16:18:52 +09:00
Andrew Gaul
48e9e51f4f
Remove more unneeded headers identified by IWYU (#2011) 2022-07-30 12:06:47 +09:00
Andrew Gaul
01a92476e6
Remove unneeded headers identified by IWYU (#2007) 2022-07-28 23:38:38 +09:00
Andrew Gaul
3928a7e359
Remove more uses of const_cast (#2006)
Follows on to #2004.
2022-07-28 23:37:15 +09:00
Takeshi Nakatani
4b2f3fecb5 Set mtime/ctime/atime of all objects as nanosecond 2022-07-28 13:47:03 +09:00
Takeshi Nakatani
ccfc119e45 Improved to avoid unnecessary head request 2022-07-27 21:51:28 +09:00
Takeshi Nakatani
404c284440 Fixed race condition in dirname and basename call 2022-07-24 18:14:58 +09:00
Andrew Gaul
e0655008b3
Protect pending_status in UploadPending (#1992)
This requires avoiding double-locking in RowFlush.  References #1991.
2022-07-22 23:30:04 +09:00
Takeshi Nakatani
d22e1dc018 Add the stream upload which starts uploading parts before Flush 2022-07-17 22:20:45 +09:00
Andrew Gaul
4e163b2888
Allow listing implicit directories (#1986)
This fixes an issue when using -o notsup_compat_dir flag, dating back
to its introduction 3ac39d61f8.  The new
default exposed this in my local testing but a test runner bug masked
a test failure in test_external_directory_creation.  References #927.
References #1984.
2022-07-17 01:54:29 +09:00
Andrew Gaul
e7ed01b35f
Consume return code from get_object_attribute (#1976)
Found via clang-analyzer.
2022-07-09 16:45:23 +09:00
Takeshi Nakatani
73b49c1038 Fixed a bug that regular files could not be created by mknod 2022-06-29 16:56:19 +09:00
Andrew Gaul
8b90cd6ba1
Enable notsup_compat_dir by default (#1970)
Few applications create the dir_$folder$ objects and users can enable
compat_dir if required.  This commit reduces readdir latency by 33%.
Also remove notsup_compat_dir from tests since these directories are
never created.  Fixes #927.  References #1643.
2022-06-28 07:56:06 +09:00
Takeshi Nakatani
92fd5bc3e1
Fixed errors reported by cppcheck 2.8 (#1949) 2022-05-26 01:48:53 +09:00
Andrew Gaul
5c57e17b77
Enable noobj_cache by default (#1922)
This should improve performance in many situations.  s3fs already
enables the stat cache by default so memorizing noobj makes this more
consistent.  Fixes #1901.
2022-03-12 16:57:31 +09:00
Takeshi Nakatani
d842d45b2b Fixed a bug about truncation for shrinking file 2022-03-02 22:41:10 +09:00
Takeshi Nakatani
684ced5a41 Changed handling the credential in S3fsCred more robust 2022-03-02 22:39:15 +09:00
Andrew Gaul
81ed2bd91e
Propagate deferred exit status from main (#1912)
Previously s3fs always returned zero when the bucket did not mount.
Fixes #1911.
2022-02-23 10:09:12 +09:00
Takeshi Nakatani
b64dc7749c Moved parameter analysis processing to S3fsCred class 2022-02-19 17:23:40 +09:00
Takeshi Nakatani
839a33de49
Fixed not to call Flush even if the file size is increased (#1887)
Changed s3fs_truncate function.
This change reduces the number of file uploads if the file size is changed.

On macOS, I have found that the truncate call when "size=0" cannot reflect the file size.(This reason is not understood...)
To avoid this, only when "size=0", the flush method is called as before.

Other than that, I found a bug in FdEntity::Open() and fixed it.

Fixes #1875.
2022-02-15 21:29:07 +09:00
Takeshi Nakatani
1678803566 Added S3fsCred class and moved Credential related processing in it 2022-02-13 21:38:30 +09:00
Andrew Gaul
9224f792f0
Use CLOCK_REALTIME for UTIME_NOW (#1881)
Previously s3fs_utimens used CLOCK_MONOTONIC_COARSE which was not
1970-based.  Found via pjdfstest.  References #1589.
2022-01-30 22:19:15 +09:00
Andrew Gaul
0c75a63184
Preserve sub-second precision with utimens (#1880)
Found via pjdfstest.  References #1589.
2022-01-30 21:45:51 +09:00
Andrew Gaul
cd5a69b9eb
Handle UTIME_NOW and UTIME_OMIT special values (#1868)
FUSE 3 will require this behavior.  References #1159.
2022-01-29 11:35:37 +09:00
Naoki Ikeguchi
41aaa4184f Avoid double setting values in statfs 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
19303a546e Fix the statfs issue, using f_frsize instead 2022-01-23 21:49:51 +09:00
Naoki Ikeguchi
6370e150dd Disable features that causes problems on Windows 2022-01-23 21:49:51 +09:00
Andrew Gaul
e734763002
Remove createbucket option (#1841)
AWS CLI can do this.  Fixes #1840.
2022-01-05 01:59:31 +09:00
Andrew Gaul
3cf00626a2
Add option to allow unsigned payloads (#1801)
This reduces CPU usage of sigv4.  This reduces test run-time by 7
seconds per flag.
2021-11-01 23:33:55 +09:00
Takeshi Nakatani
78126aea0b Added exclusive control of statc variables in s3fs xml parser 2021-10-27 08:18:19 +09:00
Andrew Gaul
48817d849f
Require explicit length in s3fs_decode64 (#1755)
This is available from std::string::size in callers.
2021-08-31 09:22:10 +09:00
Andrew Gaul
18e9c62087
Make string constants read-only const (#1733)
This removes some global constructors.  Also use a consistent ALL_CAPS
style.
2021-08-03 00:10:27 +09:00
Takeshi Nakatani
34f89e5936 Added fake_diskfree option to deceive free disk space for test 2021-08-02 11:04:42 +09:00
Carsten Grohmann
e1f3b9d8c1
Add support for AWS-style environment variables (#1729)
Support AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY and AWS_SESSION_TOKEN
in addition to the AWSACCESSKEYID, AWSSECRETACCESSKEY and
AWSSESSIONTOKEN.

The old environment variables are still supported, but they are
deprecated and no longer documented.

Close #1708
2021-07-26 23:29:45 +09:00
Martynov Maxim
881025cc9e
Add initiator pid, uid and gid to a debug log (#1716) 2021-07-10 16:23:20 +09:00
Andrew Gaul
fe44355d25
Report s3fs space as 18.4 EB (#1709)
256 TB probably seemed large in 2007 but in 2021 it is small enough to
confuse some users.
2021-07-02 07:56:05 +09:00
Andrew Gaul
f505c8224e
Explicitly specify lock type (#1701)
This makes it more clear and type-safe if the caller already has the
lock.  Follows on to 84174c560d.
2021-06-27 15:15:48 +09:00
Andrew Gaul
2154e898bc
Fix typos (#1700) 2021-06-27 11:22:33 +09:00
Takeshi Nakatani
f9e80f995d Fixed a bug about rename existing file of different sizes by mpcopy 2021-06-26 00:04:58 +09:00
Takeshi Nakatani
6edf3d6427 Updated to clearly output message about the file descriptor type(pseudo/physical) 2021-06-25 19:18:08 +09:00
Carsten Grohmann
c4ac923b4c
Ensure NUL-terminated result after strncpy (#1694)
Long symlinks may cause that the result buffer is filled and not proper
terminated with a null byte.
2021-06-21 08:08:56 +09:00
Takeshi Nakatani
cc022a68f4 Fixed a bug in s3fs_write 2021-06-20 23:13:44 +09:00
Takeshi Nakatani
858562ed53 Fixed comparison warning for size_t variable 2021-06-20 16:53:25 +09:00
Andrew Gaul
b8724425d3
Require explicit base parameter in cvt_strtoofft (#1683)
Also convert most callers of cvt_strtoofft to base 10 which avoid the
magical behavior of interpreting a leading 0 as octal.
References #1682.
2021-06-20 11:00:15 +09:00
Carsten Grohmann
d67b83e671 Allow configuration for temporary files directory 2021-06-16 21:29:58 +09:00
Andrew Gaul
a100be9dce
Prefer std::string::empty over length == 0 (#1679)
This is more concise.
2021-06-13 20:03:10 +09:00
Andrew Gaul
7638b5b3e3
Prefer std::string::rbegin over operator[] (#1673)
This is more concise and safer due to not repeating the variable name.
We cannot use std::string::back since it is not available in C++03.
2021-06-13 13:26:38 +09:00
Andrew Gaul
600cee118d
Fix implicit narrowing conversions (#1672)
These do not appear to be problematic but rather just clean up warnings.
Found via clang -Wshorten-64-to-32.
2021-06-13 12:50:07 +09:00
Takeshi Nakatani
c2c56d0263 Added info object about multipart uploading for each pseudo fd
(and fixed typo about method name)
2021-06-04 22:42:58 +09:00
Takeshi Nakatani
ac578d188e Introduced pseudo fd and separated fd for each file opening 2021-06-04 22:42:58 +09:00
Andrew Gaul
84174c560d
Fix data races caused by incorrect locking (#1668)
Found via Threadsanitizer.  Fixes #1471.
2021-05-29 00:11:55 +09:00
Andrew Gaul
bbcccd6e98
Make storage class a string (#1663)
This allows non-standard storage classes like Google Cloud Storage
Nearline.  Fixes #1613.
2021-05-21 23:34:31 +09:00
Takeshi Nakatani
b5fef788da Additional bug fixing for not creating zero-byte object 2021-05-09 17:33:53 +09:00
Andrew Gaul
9abe3fa662
Use same time when creating directory objects (#1652)
This avoids mismatched times and is slightly faster.
2021-05-09 13:44:12 +09:00
Andrew Gaul
cb9148f6cd
Update for clang-tidy 12 (#1644) 2021-05-03 09:43:18 +09:00
Andrew Gaul
771bbfeac5
Do not create zero-byte object when creating file (#1640)
Previously s3fs created this object to store metadata and overwrote it
when flushing.  This prevented use with object stores which do not
allow overwrites like HDS.  Instead only create an in-memory
representation which reduces the time to create small files.
Fixes #1013.
2021-04-30 19:56:33 +09:00
Andrew Gaul
3694786112
Propagate errno instead of EIO (#1638)
This improves error fidelity.  Follows on to
b70f8db037.  References #1523.
2021-04-30 07:09:00 +09:00
Andrew Gaul
e9eb248f2f
Fail CheckBucket when S3 returns PermanentRedirect (#1630)
Previously s3fs allowed mounting but all operations returned EIO.
References #693.

Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
2021-04-24 18:46:24 +09:00
Ambika Nair
77581eda59 Change in ibm iam endpoint 2021-04-21 21:42:55 +09:00
Andrew Gaul
7f3e423bbe
Preserve sub-second time precision (#1624)
Found via pjdfstests.  References #897.  References #1589.
2021-04-18 13:11:12 +09:00
Andrew Gaul
706e3cbebd
Update ctime and mtime when opening with O_TRUNC (#1623)
Found via pjdfstests.  References #1589.
2021-04-15 07:08:49 +09:00
Andrew Gaul
01a26a9011
Do not allow open with O_RDONLY and O_TRUNC (#1620)
Found via pjdfstests.  References #1589.
2021-04-13 07:28:10 +09:00
Andrew Gaul
23e1fbf7b9
Update ctime when truncating file (#1619)
Found via pjdfstests.  References #1589.
2021-04-13 07:08:06 +09:00
Andrew Gaul
ed2e877bb6
Return EACESS when lacking required executable bit (#1617)
This makes the check consistent with read and write.  Found via
pjdfstests.  References #1551.  References #1589.
2021-04-11 22:39:27 +09:00
Andrew Gaul
3663082a01
Do not allow renaming to a non-empty directory (#1604)
Found via pjdfstests.  References #1589.
2021-03-28 19:10:52 +09:00
Takeshi Nakatani
b589ebec23 Output version and command parameters at startup 2021-03-06 19:11:57 +09:00
Andrew Gaul
032fcf2a47
Allow optional issuing of ListObjectsV2 (#1583)
This allows use of s3fs on object stores that do not implement
the V1 API.  Fixes #1573.
2021-02-23 09:45:13 +09:00
Takeshi Nakatani
5b5bc3114a Fixed a bug that padded null bytes when changing xattr 2021-02-21 12:23:36 +09:00
Takeshi Nakatani
81e267d421 Fixed the same bug in chmod/chown/utimens and added tests 2021-02-20 23:30:50 +09:00
Takeshi Nakatani
4fc92d59f3 Fixed a bug that filling NULL bytes when changing the attribute after renaming 2021-02-20 23:30:50 +09:00
Takeshi Nakatani
a0f347b10f Added no_time_stamp_ms option mainly for testing 2021-02-20 20:24:26 +09:00
Takeshi Nakatani
4da56acdcc Improved processing when HEAD response is 400 2021-02-13 17:00:13 +09:00
Andrew Gaul
134a54b32f
Allow configuring the multipart threshold (#1562)
Also change default which improves write performance for files >= 25
MB and <= 5 GB, particularly over lossy networks.

Co-authored-by: Takeshi Nakatani <ggtakec@gmail.com>
2021-02-11 23:35:46 +09:00