Andrew Gaul
b123a8aba5
Tighten up CLI argument handling
...
This ensures that each option is only handled once.
2023-08-15 19:18:17 +09:00
Andrew Gaul
56a4e67009
Replace more raw pointers with std::unique_ptr ( #2255 )
2023-08-14 00:03:10 +09:00
Takeshi Nakatani
5b93765802
Fixed a warning for compiling C/C++ codes
2023-08-13 20:49:39 +09:00
Takeshi Nakatani
acea1d33f9
Fixed string test for s3fs_base64
2023-08-13 20:48:38 +09:00
Andrew Gaul
528a61718d
Convert manual memory allocations to std::unique_ptr ( #2253 )
2023-08-11 23:26:07 +09:00
Andrew Gaul
c5a75a1fb2
Delete copy constructors and assignment operators ( #2257 )
...
One of these was buggy and others had the wrong parameters and return
types.
2023-08-11 13:12:03 +09:00
Andrew Gaul
3790a0f8b4
Calculate MD5 without using a temporary file ( #2252 )
...
This mirrors the SHA256 code.
2023-08-07 00:17:15 +09:00
Andrew Gaul
779afe5d62
Make help more consistent ( #2251 )
2023-08-06 22:25:10 +09:00
Andrew Gaul
26b5658d70
Wrap ps3fscred with std::unique_ptr ( #2250 )
...
This removes many manual memory deallocations.
2023-08-06 22:23:25 +09:00
Andrew Gaul
c568a69452
Return std::string from base64 encoding function ( #2248 )
...
This is avoids manual memory allocations.
2023-08-06 22:22:02 +09:00
Andrew Gaul
13ad53eef7
Convert most std::list to std::vector ( #2247 )
...
This tends to be more efficient due to fewer allocations. Also fix std::sort
comparator which should be strictly less than.
2023-08-05 10:05:32 +09:00
Andrew Gaul
b14758baff
Fix junk_data for 32-bit platforms ( #2245 )
...
Previously this had a mismatch between size_t and unsigned long long.
2023-08-05 09:37:18 +09:00
Andrew Gaul
b5c3fc0a08
Convert fixed-size allocations to C++11 std::array ( #2242 )
...
This is safer and more efficient.
2023-08-05 09:36:22 +09:00
Andrew Gaul
b29f8d0f2b
Use C++ enum class for most enums ( #2241 )
...
This promotes type-safety.
2023-07-30 22:53:17 +09:00
Andrew Gaul
5699875e30
Use C++11 emplace where possible ( #2240 )
...
This is more concise and sometimes more efficient.
2023-07-30 22:51:20 +09:00
Andrew Gaul
3081e419e1
Simplify direct shellcheck download with jq ( #2239 )
2023-07-29 09:22:55 +09:00
Andrew Gaul
a7b38a6940
Address stray warnings ( #2237 )
2023-07-29 09:19:18 +09:00
Andrew Gaul
1f04165a33
Convert most str callers to C++11 std::to_string ( #2238 )
...
Remaining ones handle timespec.
2023-07-28 18:21:55 +09:00
Andrew Gaul
36db898d01
Use C++11 std::map::erase return value ( #2236 )
2023-07-27 23:34:43 +09:00
Andrew Gaul
38a1ff42e5
Convert test binaries to C++ ( #2235 )
...
This ensures that they are compiled with a consistent compiler and set of flags
as the rest of s3fs.
2023-07-27 23:15:19 +09:00
Andrew Gaul
a4a2841c05
Use C++11 nullptr instead of 0 or NULL ( #2234 )
...
This improves type-safety.
2023-07-27 21:56:58 +09:00
Andrew Gaul
0ece204393
Fix -Wshorten-64-to-32 warnings
2023-07-27 12:23:26 +09:00
Andrew Gaul
6344d74ae3
Replace some raw pointers with std::unique_ptr ( #2195 )
...
This simplifies code paths and makes memory leaks less likely. It
also makes memory ownership more explicit by requiring std::move.
This commit requires C++11. References #2179 .
2023-07-27 09:12:28 +09:00
Takeshi Nakatani
faec0d9d15
Refixed for cppcheck 2.1x
2023-07-26 07:55:33 +09:00
Andrew Gaul
e14a2eb94b
Add AWS CLI config for use_sse=custom ( #2230 )
2023-07-25 23:31:20 +09:00
Takeshi Nakatani
cb3dc28e6e
Supported cppcheck 2.10(and changed std from c++03 to c++11 for RHEL7)
2023-07-25 08:08:06 +09:00
Takeshi Nakatani
38dc65180b
Fixed checking cppcheck version in ci.yml
2023-07-24 11:07:31 +09:00
Andrew Gaul
2405706643
Insert SSE headers when appropriate ( #2228 )
...
References #2218 . References #2227 .
2023-07-23 16:17:34 +09:00
Andrew Gaul
5371cd1468
Update ChangeLog and configure.ac for 1.93 ( #2225 )
...
Fixes #2213 .
2023-07-19 22:31:43 +09:00
Eryu Guan
7978395083
Use smart pointer to manage pcfstat object
...
Previously pcfstat points to a raw pointer, and it may be leaked if
function returned before deleting it.
So use smart pointer to automatically release the object.
Note that currently s3fs only uses c++03, so we use auto_ptr here, not
unique_ptr, which requires c++11.
Fixes: 6ca5a24a7f
("Fix two inconsistency issues between stat cache and cache file (#2152 )")
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2023-07-19 20:15:55 +09:00
Takeshi Nakatani
d0a944fcaa
Fixed data race about fuse_fill_dir_t function and data pointer
2023-07-14 22:32:12 +09:00
Andrew Gaul
537384e9b5
Guard filler calls with filled check ( #2215 )
...
Follows on to e650d8c55c
.
2023-07-13 22:46:19 +09:00
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
9663215bb4
Fixed data race at OPENSSL_sk_dup/free in libcurl
2023-07-12 22:51:57 +09:00
Takeshi Nakatani
b2537052ef
Fixed data race in threads found thread sanitizer
2023-07-09 20:53:27 +09:00
Eryu Guan
2e51908bec
Check FdEntity::Open() status correctly
...
FdEntity::Open() returns -errno on error, but FdManager::Open() only
checks if its ret is -1. This may lead to use '-errno' as pseudo fd
in next read or write, which would fail due to '-errno' is not in
fent map.
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>
2023-07-05 08:50:12 +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
Andrew Gaul
06d0852e74
Use JDK 17 for Ubuntu CI ( #2200 )
...
Also remove stale 18.04 configuration.
2023-06-26 22:07:04 +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
Andrew Gaul
e66c9a82a2
Add sanitize_thread to CI ( #2199 )
2023-06-25 23:13:49 +09:00
Andrew Gaul
e86e6cf24f
Add Ubuntu 23.04 and remove 18.04
...
18.04 is EOL:
https://ubuntu.com/blog/ubuntu-18-04-eol-for-devices
This removes a FUSE 3 blocker. References #1159 .
2023-06-25 22:53:59 +09:00
Andrew Gaul
7e8238abc0
Upgrade to JDK 17 ( #2196 )
...
Newer distros package this but some older ones do not. Also remove
stale Ubuntu 16.04 configuration.
2023-06-25 18:05:38 +09:00
Andrew Gaul
6448c8f1a8
Protect FdEntity::physical_fd with fdent_lock ( #2194 )
...
* Protect FdEntity::physical_fd with fdent_lock
Found via ThreadSanitizer.
2023-06-25 16:43:15 +09:00
Andrew Gaul
3b6688253f
Address cppcheck 2.10 warnings ( #2163 )
...
Disable newer cppcheck until we can diagnose this further.
References #2162 .
2023-06-25 16:04:16 +09:00
Alex Fishman
45e7cd085a
Add support for FUSE-T on macos
...
Signed-off-by: Alex Fishman <alex@fuse-t.org>
Signed-off-by: alex <alex@alex-NUC10.lan>
2023-06-24 22:26:42 +09:00
Takeshi Nakatani
7c9cf84316
Added several memory checks to CI
2023-06-11 10:23:08 -07:00
Takeshi Nakatani
580775b47c
Removed unnecessary debug output
2023-06-07 20:48:50 -07:00
Takeshi Nakatani
eab26a1e01
Fixed test setting for macOS
2023-06-07 20:48:34 -07:00
Andrew Gaul
1910856c6c
Remove wait and check loop from mk_test_file ( #2175 )
...
This appears to be some kind of eventual consistency check. This
should have no effect given S3Proxy and recent AWS strong consistency.
Also it is likely ineffective given the other test object creation
operations.
2023-06-07 23:24:31 +09:00
Andrew Gaul
4b3e715291
Always return nanoseconds from get_time helpers ( #2174 )
...
This makes Linux and macOS more consistent.
2023-05-30 18:52:55 +09:00