Andrew Gaul
89b1c32b24
Rework s3fs pid handling
...
Previously S3FS_PID was not set in the correct shell and thus
ps u $S3FS_PID showed all programs. This caused the flag detection to
fail when users ran other instances of s3fs with different flags.
References #1402 .
2020-09-18 22:05:37 +09:00
Takeshi Nakatani
76d88f2291
Merge pull request #1403 from gaul/vim/expandtab
...
Fix expandtab settings for tests
2020-09-17 21:35:58 +09:00
Takeshi Nakatani
72340cfbd9
Merge pull request #1401 from gaul/test/hardlink
...
Add test for hardlink
2020-09-17 20:04:07 +09:00
Takeshi Nakatani
8c29b60129
Merge pull request #1400 from gaul/test/concurrent-read
...
Add test for concurrent reads
2020-09-17 19:26:44 +09:00
Takeshi Nakatani
93cf67c65d
Merge pull request #1399 from gaul/md5-sha256
...
Use more descriptive names for digest functions
2020-09-17 17:11:19 +09:00
Andrew Gaul
8fb70c5e4a
Fix expandtab settings for tests
...
This matches the main source.
2020-09-15 22:11:14 +09:00
Takeshi Nakatani
c58c91fc4f
Merge pull request #1398 from gaul/memset
...
Remove unneeded memset calls
2020-09-15 22:09:54 +09:00
Andrew Gaul
78e2345c19
Add test for hardlink
2020-09-15 22:07:25 +09:00
Andrew Gaul
3bc565b986
Add test for concurrent reads
2020-09-15 21:25:51 +09:00
Andrew Gaul
b7187352e1
Use more descriptive names for digest functions
...
Previously they used hex to refer to binary data which is confusing
since other std::string return types are actually hex. Also remove
unused s3fs_md5sum.
2020-09-15 21:18:58 +09:00
Takeshi Nakatani
1520ca6220
Merge pull request #1397 from gaul/hex
...
Centralize hex conversion
2020-09-15 21:14:23 +09:00
Takeshi Nakatani
f7a63d5c97
Merge pull request #1396 from gaul/32-bit-read
...
Use off_t for read sizes
2020-09-15 20:05:19 +09:00
Takeshi Nakatani
3958450c05
Added a class for automating fdentity reference counts
2020-09-14 22:02:28 +09:00
Andrew Gaul
5121c73ed1
Remove unneeded memset calls
...
Also use constant for array lengths.
2020-09-14 19:51:36 +09:00
Andrew Gaul
44eaac8471
Centralize hex conversion
2020-09-14 19:28:59 +09:00
Andrew Gaul
77501c3600
Use off_t for read sizes
...
This fixes an issue with large multipart_size on 32-bit platforms like
Raspberry Pi.
2020-09-14 18:12:23 +09:00
Takeshi Nakatani
8205607716
Fixed incorrect Signal related message at s3fs initialization and termination
2020-09-13 18:54:10 +09:00
Takeshi Nakatani
c7132b7f56
Merge pull request #1390 from gaul/namespace-std
...
Remove uses of implicit namespace std
2020-09-13 13:26:22 +09:00
Andrew Gaul
1043e08dfa
Remove uses of implicit namespace std
...
Fixed via:
sed -i '/using namespace std/{N;d}' src/*.cpp
sed -i 's/ string/ std::string/g' src/*.cpp
sed -i 's/(string/(std::string/g' src/*.cpp
sed -i 's/\[string/\[std::string/g' src/*.cpp
sed -i 's/^string/std::string/g' src/*.cpp
sed -i 's/ ifstream/ std::ifstream/g' src/*.cpp
sed -i 's/ istringstream/ std::istringstream/g' src/*.cpp
sed -i 's/ ostringstream/ std::ostringstream/g' src/*.cpp
sed -i 's/ max(/ std::max(/g' src/*.cpp
sed -i 's/ min(/ std::min(/g' src/*.cpp
sed -i 's/ endl/ std::endl/g' src/*.cpp
2020-09-13 11:57:20 +09:00
Takeshi Nakatani
e5f4f9b69e
Merge pull request #1393 from gaul/32-bit-casting
...
Fix casting warnings on 32-bit platforms
2020-09-13 10:40:56 +09:00
Takeshi Nakatani
1e3c10d803
Merge pull request #1392 from gaul/large-singlepart-32-bit
...
Use 64-bit off_t when computing digests
2020-09-13 10:39:34 +09:00
Takeshi Nakatani
6fa4477673
Merge pull request #1389 from gaul/flags
...
Remove incorrect string prefix comparisons
2020-09-13 10:17:33 +09:00
Andrew Gaul
6d1e704e34
Fix casting warnings on 32-bit platforms
2020-09-12 18:22:32 +09:00
Andrew Gaul
ffc33a447f
Use 64-bit off_t when computing digests
...
This allows 32-bit platforms like Raspberry Pi to upload single-part
objects larger than 2 GB.
2020-09-12 15:00:23 +09:00
Andrew Gaul
39ec8e242e
Remove incorrect string prefix comparisons
...
Previously flags like -o nouafoobar were parsed as -o noua. Found
via:
grep STR2NCMP src/s3fs.cpp | grep -v '="'
2020-09-11 17:38:20 +09:00
Ben Mares
0d4e39ad1c
return 0 after parsing "use_session_token" arg ( #1388 )
...
return 0 after parsing "use_session_token" arg
I hope this might fix #651 .
There's clearly an open bug in #651 confirmed by several users related to the parsing of the `-o use_session_token`. Looking at the source, I noticed that there was a return value everywhere except here, so I suspect this may be responsible.
2020-09-11 08:09:36 +09:00
Takeshi Nakatani
6112eb6a49
Merge pull request #1385 from liuyongqing/master
...
close FdEntity to avoid leakage
2020-09-10 19:44:48 +09:00
yongqingliu
986fab8738
close FdEntity to avoid leakage
2020-09-07 20:48:16 +08:00
Takeshi Nakatani
b5ffd419d8
Source file division and set 4 spaces and cleanup
2020-08-26 17:43:50 +09:00
Takeshi Nakatani
c6e23212bb
Merge pull request #1375 from gaul/cppcheck
...
Add const where possible
2020-08-21 07:32:39 +09:00
Takeshi Nakatani
e75c11956c
Merge pull request #1374 from gaul/deep-archive
...
Add support for deep archive storage class
2020-08-21 07:01:43 +09:00
Andrew Gaul
1ec8528502
Add const where possible
...
Found via cppcheck 2.1
2020-08-20 23:46:11 +09:00
Andrew Gaul
892e7129c5
Add support for deep archive storage class
2020-08-20 23:42:45 +09:00
Takeshi Nakatani
bdea2ee5c8
Merge pull request #1373 from gaul/enum
...
Use scoped enums for acl_t, sse_type_t, and storage_class_t
2020-08-20 23:06:52 +09:00
Takeshi Nakatani
a5186c73c2
Merge pull request #1365 from ggtakec/check_lseek
...
Dynamically determine whether lseek extended options are supported
2020-08-20 22:36:56 +09:00
Takeshi Nakatani
4580e6ff93
Merge pull request #1364 from ggtakec/test_nospace_mv
...
Added mv file test when disk space is insufficient
2020-08-20 22:08:09 +09:00
Andrew Gaul
60d456a993
Use scoped enums for acl_t, sse_type_t, and storage_class_t
...
This prevents some kinds of implicit conversions. Also deduplicate
str/from_str logic. References #1371 .
2020-08-20 18:46:18 +09:00
Takeshi Nakatani
bcf6838e86
Merge pull request #1370 from gaul/vim/modeline
...
Correct vim modeline to 2-space indentation
2020-08-19 22:44:40 +09:00
Takeshi Nakatani
41a66d9706
Merge pull request #1368 from gaul/curl-lock
...
Prefer named locks in curl
2020-08-19 22:17:32 +09:00
Andrew Gaul
958ad83a4b
Correct vim modeline to 2-space indentation
2020-08-19 21:03:46 +09:00
Andrew Gaul
ba61470bae
Prefer named locks in curl
...
This removes the confusing and unsafe pthread_mutex_t array.
2020-08-18 22:20:41 +09:00
Takeshi Nakatani
0e895f60a0
Merge pull request #1366 from gaul/curl_handles_lock
...
Consistently lock curl_times and curl_progress
2020-08-17 19:27:21 +09:00
Andrew Gaul
8210a1b2f2
Consistently lock curl_times and curl_progress
...
References #1362 .
2020-08-17 09:47:38 +09:00
Takeshi Nakatani
2feefeec47
Added mv file test when disk space is insufficient
2020-08-16 12:47:29 +00:00
Takeshi Nakatani
55cb8920d5
Dynamically determine whether lseek extended options are supported
2020-08-16 12:37:11 +00:00
Takeshi Nakatani
46acbf10ba
Merge pull request #1363 from gaul/is-modified-race
...
Lock fdent_data_lock before accessing pagelist
2020-08-16 20:25:24 +09:00
Takeshi Nakatani
f28e3bd89e
Merge pull request #1362 from gaul/test/sanitizers
...
Add script to run tests using sanitizers
2020-08-16 19:15:05 +09:00
Takeshi Nakatani
2c0408b95a
Merge pull request #1357 from gaul/readdir
...
Call readdir instead of readdir_r
2020-08-16 18:50:38 +09:00
Takeshi Nakatani
057da86d87
Merge pull request #1356 from gaul/printf-size_t
...
Prefer %zd and %zu for ssize_t and size_t
2020-08-16 18:16:59 +09:00
Andrew Gaul
8de6cb3504
Lock fdent_data_lock before accessing pagelist
...
Found via ThreadSanitizer. References #1353 . References #1362 .
2020-08-16 17:44:03 +09:00