bfc3ea767a
Removed last use of S3fsMultiCurl and changed those thread handling
2024-11-26 10:47:03 +09:00
499577c2a9
Refactored for standardizing content and copy handling for Multipart Upload
2024-11-25 05:48:38 +09:00
7410b95db2
Refactored parallel get object request
2024-11-23 02:22:27 +09:00
86b5c9d88e
Refactored multipart put head request
2024-11-16 09:35:23 +09:00
a1e47bc287
Changed multiple Head requests from S3fsMultiCurl to ThreadPoolMan
2024-11-14 07:41:03 +09:00
efc23316e9
Refactored single type requests to use through ThreadPoolMan
2024-11-12 09:08:14 +09:00
9a155c81a7
Enable clang-analyzer ( #2588 )
...
Also fix a few smaller issues.
2024-11-04 23:58:43 +09:00
07881195f2
Add missing mutex header ( #2576 )
...
Found via clang-tidy.
2024-10-29 00:11:28 +09:00
7cb46db945
Add missing string header ( #2574 )
...
Found via clang-tidy.
2024-10-25 16:13:57 +09:00
fe82477a6b
Add missing utility header for std::move ( #2572 )
...
Found via clang-tidy.
2024-10-25 14:55:01 +09:00
31061416bc
Separate serialization and deserialization code ( #2566 )
...
This is clearer than a bool parameter.
2024-10-24 08:22:35 +09:00
fe0a62118d
Remove some unused parameters ( #2565 )
2024-10-22 20:34:22 +09:00
4b6e53223b
Use std::shared_ptr to refer to FdEntity ( #2541 )
...
FdEntity may have multiple references due to ChangeEntityToTempPath.
This relies on the std::enable_shared_from_this helper to create a
std::shared_ptr from this. Fixes #2532 .
2024-10-20 14:56:29 +09:00
a505cebf9b
Expand use of std::unique_ptr for FILE* ( #2555 )
2024-10-18 22:06:47 +09:00
141d74f187
Use auto for iterator variable types ( #2554 )
...
This touches a few other long type names. Applied via clang-tidy
-fix.
2024-10-18 21:57:52 +09:00
4c5b7595b4
Add missing GUARDED_BY to fdcache_entity ( #2549 )
...
This requires a fake GetMutex for the lock checker to understand the
control flow. Also remove unneeded locking comments that annotation
supersede. Follows on to #2491 .
2024-10-18 00:39:45 +09:00
06a3822965
[Improvement #2490 ] Add GUARDED_BY to FdEntity and fix locking
2024-10-15 02:04:46 +09:00
743c86e506
Fix issues discovered by Coverity ( #2535 )
2024-10-08 08:07:13 +09:00
4fe2652c6c
Fix Windows compilation ( #2506 )
...
* docs: Fix Windows compile instructions
Signed-off-by: Naoki Ikeguchi <me@s6n.jp >
* fix: Use fallocate stub on MSYS2
Signed-off-by: Naoki Ikeguchi <me@s6n.jp >
---------
Signed-off-by: Naoki Ikeguchi <me@s6n.jp >
2024-07-27 09:54:38 +09:00
fcb5aa77fb
Fix minor issues when compiling with MSYS ( #2505 )
...
References #2503 .
2024-07-27 09:43:16 +09:00
411e42384e
Acquire lock before logging ( #2502 )
...
This is not safe -- another caller could modify a std::string field
while logging which could read an invalid pointer. References #2490 .
2024-07-21 16:14:22 +09:00
622dc0a815
Convert pthread_mutex to std::mutex ( #2476 )
...
This simplifies resource management and improve Windows compatibility.
2024-06-24 00:48:01 +09:00
86b353511a
Replace memset with C++11 value initialization ( #2471 )
...
This generates the same code but is safer due to using an implicit
length and allowing member initialization.
2024-06-24 00:24:49 +09:00
fa807a56fb
Fix typos ( #2473 )
2024-06-23 15:33:46 +09:00
254d717a4a
Address clang-tidy 19 warnings ( #2474 )
2024-06-23 12:21:51 +09:00
2841601ad5
Remove uses of AutoLock::ALREADY_LOCKED ( #2466 )
...
Instead annotate the methods with REQUIRES so that the caller knows if
they should lock. For public interfaces, introduce HasLock wrappers.
This simplifies control flow, allows migration to std::mutex, and
eventually will enable use of static lock checking.
2024-06-23 11:24:51 +09:00
ebae5a302f
Prefer std::string::clear where possible ( #2467 )
...
This is somewhat more clear and is declared noexcept.
2024-06-10 23:36:49 +09:00
c97f7a2a13
Address clang-tidy 18 warnings ( #2428 )
2024-03-07 01:04:22 +09:00
517574c40c
Fixed a bug in fdatasync(fsync)
2024-02-06 14:11:37 +09:00
68bbfee8ea
Address clang-tidy modernize-deprecated-headers ( #2370 )
2023-11-19 10:00:16 +09:00
4845831f93
Convert some const to constexpr ( #2342 )
...
This guarantees that the function or value will resolve at compile-time.
2023-11-14 22:15:17 +09:00
f9d3941d9d
Fixed a bug in the re-upload part of Streamupload
2023-11-10 10:41:26 +09:00
d0c4b5c763
Fixed a bug in exclusive control of pagelist in FdEntity class
2023-09-26 21:26:17 +09:00
61df7bf42c
Use std::unique_ptr for fclose ( #2318 )
...
References #2261 .
2023-09-25 23:55:11 +09:00
4d5632912a
Initialize variable before use ( #2302 )
...
clang-analyzer found a path where this could be used without
initialization.
2023-09-06 23:32:49 +09:00
e8cb6d6d34
Abort after failed MPU ( #2298 )
...
This reclaims storage after a failed MPU which caused OutOfMemory
issues in #2291 .
2023-08-29 23:29:16 +09:00
7bb9609827
Return errors from AutoFdEntity::Open ( #2296 )
...
Found via pjdfstest which creates a PATH_MAX path that should return
NAMETOOLONG.
2023-08-29 22:57:30 +09:00
b2bb12fd2c
Remove unneeded explicit std::string constructors ( #2273 )
...
std::string(const char*) implicitly constructs these. The remaining call sites
requires string literals from C++14.
2023-08-17 22:12:28 +09:00
5b93765802
Fixed a warning for compiling C/C++ codes
2023-08-13 20:49:39 +09:00
b29f8d0f2b
Use C++ enum class for most enums ( #2241 )
...
This promotes type-safety.
2023-07-30 22:53:17 +09:00
a7b38a6940
Address stray warnings ( #2237 )
2023-07-29 09:19:18 +09:00
1f04165a33
Convert most str callers to C++11 std::to_string ( #2238 )
...
Remaining ones handle timespec.
2023-07-28 18:21:55 +09:00
36db898d01
Use C++11 std::map::erase return value ( #2236 )
2023-07-27 23:34:43 +09:00
a4a2841c05
Use C++11 nullptr instead of 0 or NULL ( #2234 )
...
This improves type-safety.
2023-07-27 21:56:58 +09:00
0ece204393
Fix -Wshorten-64-to-32 warnings
2023-07-27 12:23:26 +09:00
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
faec0d9d15
Refixed for cppcheck 2.1x
2023-07-26 07:55:33 +09:00
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
b2537052ef
Fixed data race in threads found thread sanitizer
2023-07-09 20:53:27 +09:00
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