Commit Graph

1298 Commits

Author SHA1 Message Date
Takeshi Nakatani
efc23316e9 Refactored single type requests to use through ThreadPoolMan 2024-11-12 09:08:14 +09:00
Takeshi Nakatani
a680d3e138 Removed CurlHandlerPool and simplified it
Removed CurlHandlerPool and simplified it.
And against data race in OpenSSL, temporarily changed to not use Sessin cache.
2024-11-12 07:33:04 +09:00
Andrew Gaul
cc29bea81b
Call std::get_time instead of strptime (#2598)
This reduces the Windows-specific code.
2024-11-09 19:28:40 +09:00
Andrew Gaul
af0d7ba45e
Ensure fdent_data_lock is acquired after fdent_lock (#2595) 2024-11-09 19:28:13 +09:00
Andrew Gaul
45b32046cd
Consolidate lower and upper logic (#2594) 2024-11-06 00:07:12 +09:00
Andrew Gaul
a101b88114
Compare case-insensitively instead of copying (#2593)
Also remove some code duplication.
2024-11-06 00:05:05 +09:00
Andrew Gaul
d9ccdc4fce
Look up header values directly (#2592)
stat_cache_entry::meta uses a case-insensitive comparator so there is
no need to loop over each entry to compare each key with lowercase.
2024-11-05 07:16:19 +09:00
Andrew Gaul
7a989a58a0
Remove expensive log message during s3fs_getxattr (#2590) 2024-11-05 00:00:58 +09:00
Andrew Gaul
82f694e473
Avoid unneeded std::string copies (#2589) 2024-11-04 23:59:54 +09:00
Andrew Gaul
9a155c81a7
Enable clang-analyzer (#2588)
Also fix a few smaller issues.
2024-11-04 23:58:43 +09:00
Takeshi Nakatani
9b888fa9b3 Fixed readdir bug with objects receiving EPERM on HEAD request 2024-11-04 15:25:12 +09:00
Andrew Gaul
b87a8400e3
Use pass-by-value for peeloff (#2578)
This avoids copies when used with std::move.
2024-10-29 18:21:07 +09:00
Andrew Gaul
3b226ed672
Make psemaphore similar to C++20 std::counting_semaphore (#2569) 2024-10-29 08:23:05 +09:00
Andrew Gaul
07881195f2
Add missing mutex header (#2576)
Found via clang-tidy.
2024-10-29 00:11:28 +09:00
Andrew Gaul
7cb46db945
Add missing string header (#2574)
Found via clang-tidy.
2024-10-25 16:13:57 +09:00
Andrew Gaul
fe82477a6b
Add missing utility header for std::move (#2572)
Found via clang-tidy.
2024-10-25 14:55:01 +09:00
Takeshi Nakatani
b8e56a40b2 Fixed a bug in clearing the queue accumulated during USR1 processing 2024-10-25 14:47:15 +09:00
Andrew Gaul
3ff93d7342
Simplify bucket_block_count initialization (#2571) 2024-10-25 08:37:48 +09:00
Andrew Gaul
31061416bc
Separate serialization and deserialization code (#2566)
This is clearer than a bool parameter.
2024-10-24 08:22:35 +09:00
Andrew Gaul
a8af6cb3b4
Run clang-tidy against test files (#2568) 2024-10-23 20:46:01 +09:00
Andrew Gaul
fe0a62118d
Remove some unused parameters (#2565) 2024-10-22 20:34:22 +09:00
Andrew Gaul
cc5271ef2b
Enable clang-tidy narrowing conversions (#2564) 2024-10-22 19:55:10 +09:00
Andrew Gaul
64c96e89c5
Expand use of auto (#2563)
Found via clang-tidy.
2024-10-22 19:43:12 +09:00
Andrew Gaul
b34e2711a7
Fixed warnings on integer comparisons (#2558)
Follows on to 2d1409a672.
2024-10-22 18:53:37 +09:00
Andrew Gaul
14f07626e0
Wrap EVP_MD_CTX in a std::unique_ptr (#2557) 2024-10-20 16:07:53 +09:00
Andrew Gaul
8c5ac5c2d9
Remove more raw pointers (#2556)
Make destructor public so std::unique_ptr can call it.  Also restrict
singleton creation to satisfy cppcheck.
2024-10-20 16:06:05 +09:00
Andrew Gaul
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
Andrew Gaul
a505cebf9b
Expand use of std::unique_ptr for FILE* (#2555) 2024-10-18 22:06:47 +09:00
Andrew Gaul
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
Andrew Gaul
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
Andrew Gaul
e613ae55bb
Replace curl_warnings_lock with std::atomic (#2550)
This is simpler and lighter-weight.
2024-10-18 00:36:36 +09:00
Andrew Gaul
5594106351
Add miscellaneous locking annotations (#2551) 2024-10-18 00:34:57 +09:00
Andrew Gaul
c5031a5a97
Simplify some method parameters (#2553)
Add const where possible and avoid unnecessary reference parameters.
2024-10-18 00:05:42 +09:00
brett-rickman
473f9df65a FreeBSD compilation fixes
Closes #2517.
2024-10-16 13:46:12 -07:00
Takeshi Nakatani
0c26014812 Fixed exclusive control of upload_id in PseudoFdInfo class 2024-10-16 02:46:48 +09:00
Takeshi Nakatani
06a3822965 [Improvement #2490] Add GUARDED_BY to FdEntity and fix locking 2024-10-15 02:04:46 +09:00
Takeshi Nakatani
2d1409a672 Fixed warnings on integer comparisons in openssl_auth.cpp 2024-10-15 02:00:20 +09:00
Andrew Gaul
c00b5fd4bb
Propoagate error state from insertV4Headers (#2547)
s3fs_sha256_hex_fd returns an empty string when calculating the hash
fails.
2024-10-14 10:28:19 +09:00
Andrew Gaul
3ba8c2a139
Replace non-standard VLAs with std::array (#2544) 2024-10-13 12:03:56 +09:00
Andrew Gaul
c0219b38d1
Return correct success value from NSS s3fs_md5 (#2543) 2024-10-13 11:58:54 +09:00
Andrew Gaul
40f95272be
Fix locking annotations and add one missing lock (#2542)
This allows clang's thread safety checks to pass.
2024-10-13 11:53:56 +09:00
Andrew Gaul
15e2eae69a
Address clang-tidy 19 warnings (#2540) 2024-10-13 10:09:47 +09:00
Andrew Gaul
743c86e506
Fix issues discovered by Coverity (#2535) 2024-10-08 08:07:13 +09:00
Takeshi Nakatani
4605cc2035 Fixed fake_diskfree option 2024-10-07 01:24:35 +09:00
Andrew Gaul
a259981f16
Enable cppcoreguidelines-pro-type-const-cast (#2537)
This fixes dangerous uses of const_cast.
2024-10-06 18:40:48 +09:00
Andrew Gaul
bbbb2d0908
Specify deleter function for regex_t unique_ptr (#2536) 2024-10-06 18:30:22 +09:00
Andrew Gaul
e80de15cc6
Make FILE ownership clearer via unique_ptr (#2534) 2024-10-06 18:03:02 +09:00
Andrew Gaul
df5364d758
Enable readability-implicit-bool-conversion (#2530)
This fixes one real error, one misreported EPERM, and some false
positives.  References #2529.
2024-09-28 15:28:50 +09:00
Andrew Gaul
52c10cd45d
Call Rename outside AutoFdEntity scope (#2528)
This avoids a use-after-free in the destructor.
2024-09-28 15:25:02 +09:00
Takeshi Nakatani
e8f1e3473c Fixed miss-return code in S3fsCurl::RequestPerform 2024-09-28 13:25:37 +09:00