Andrew Gaul
1ec8528502
Add const where possible
...
Found via cppcheck 2.1
2020-08-20 23:46:11 +09:00
Andrew Gaul
958ad83a4b
Correct vim modeline to 2-space indentation
2020-08-19 21:03:46 +09:00
Andrew Gaul
0fbd0eac80
Change default stat_cache_expire
...
Previously s3fs cached files forever which confused users with
creating objects using another client.
2020-07-26 23:04:43 +09:00
Andrew Gaul
40f7007263
Check results from pthread mutex calls
...
Also remove some unnecessary exception handling.
2020-05-30 16:37:55 +09:00
Takeshi Nakatani
c44a60f3f5
Fixed a bug of stats cache compression
2020-04-12 18:33:00 +09:00
Andrew Gaul
56141557dc
Avoid unneeded string copy
...
Found by clang-tidy 10.
2020-03-28 08:49:49 +09:00
Takeshi Nakatani
23945a0130
In memory cache for softlinks with cache out
2020-01-13 20:23:10 +09:00
Takeshi Nakatani
bedd648d47
Fixed build error by cppcheck 1.89
2019-09-23 10:49:49 +00:00
Andrew Gaul
f528a86219
Pass lock_already_held state to DelStat
2019-08-01 11:07:56 -07:00
Andrew Gaul
ffac4c8417
Avoid narrowing time_t and off_t args in logging
...
This displays correct results on 32-bit platforms.
2019-07-14 17:02:36 -07:00
Takeshi Nakatani
d39e4e4b1f
Merge pull request #1087 from gaul/clang-tidy/deprecated-headers
...
Prefer modern C headers
2019-07-15 03:50:15 +09:00
Andrew Gaul
6fd42d9fe4
Prefer modern C headers
...
Found and fixed via clang-tidy.
2019-07-12 03:50:59 -07:00
Andrew Gaul
a83d5baa90
Remove recursive locking
...
Recursive locking is frowned upon and is incompatible with
PTHREAD_MUTEX_ERRORCHECK. Also clean up pthread_mutex_lock error
checking.
2019-07-10 12:39:00 -07:00
Andrew Gaul
c596441f58
Flush file when opening second fd
...
Previously when s3fs had dirty local data and an application opened a
second fd it would remove the stat cache entry, query S3 for the size
which was still zero, then reinitialize FdEntry with this incorrect
size. Instead flush local data to S3 so this query works. It is
possible that a more involved patch could do this with a less
heavyweight approach but this requires changing open. This does not
completely fix git clone but allows it to proceed further. Also make
some cache methods const-correct. References #839 .
2019-07-02 01:12:09 -07:00
Andrew Gaul
4d0bef1e90
Clear containers instead of individual erases
...
This has O(n) runtime instead of O(n log n).
2019-02-02 23:58:43 -08:00
Andrew Gaul
35d55ee513
Remove unneeded void parameter
...
This is implicit in C++. Found and fixed via clang-tidy.
2019-01-28 23:22:27 -08:00
Takeshi Nakatani
a0c1f30ae7
Merge pull request #932 from gaul/autolock
...
Prefer AutoLock for synchronization
2019-01-27 15:59:18 +09:00
Andrew Gaul
92d3114584
Prefer AutoLock for synchronization
...
This simplifies the code and fixes an issue with unlocked access.
Also use a recursive lock for StatCache to avoid races between
lock..unlock..lock sequences.
2019-01-25 15:28:41 -08:00
Andrew Gaul
8316da5bbe
Remove redundant null checks before delete
...
Found by clang-tidy.
2019-01-23 11:25:25 -08:00
Andrew Gaul
40ba3b44a1
Prefer abort over assert(false)
...
The compiler can remove the latter when compiled with NDEBUG which may
cause unintended control flow.
2019-01-20 12:30:27 -08:00
Takeshi Nakatani
d373b0eca3
Merge pull request #904 from gaul/clang-tidy/c-str
...
Remove unnecessary calls to std::string::c_str
2019-01-20 14:13:46 +09:00
Andrew Gaul
508fafbe62
Remove unnecessary calls to std::string::c_str
...
Found via clang-tidy.
2019-01-17 22:05:16 -08:00
Andrew Gaul
b8c9fcfd70
Avoid pass-by-value when not necessary
...
This requires unnecessary memcpy. Found via clang-tidy.
2019-01-17 18:22:11 -08:00
Andrew Gaul
2c43b1e12b
Store and retrieve file change time
...
This introduces a new header with the change time; existing objects
will report modification time. Fixes #771 .
2019-01-14 10:05:11 -08:00
Andrew Gaul
a2f8ac535e
Address cppcheck 1.86 errors
...
Lifetime, shadowing, and unused variables. Found via the Travis macOS
builder.
2018-12-20 14:56:31 -08:00
Or Ozeri
4a72b60707
increase default stat cache size from 1000 to 100000
2018-05-06 15:31:07 +03:00
Takeshi Nakatani
0c6a3882a2
Fixed clock_gettime build failure on macOS 10.12 Sierra - #600
2017-05-28 10:04:25 +00:00
Takeshi Nakatani
9d10a5aa70
Changed copyright year format for debian pkg
2017-05-07 11:24:17 +00:00
Takeshi Nakatani
f0f61b3b55
Fixed a bug in logic about truncating stat cache
2017-04-02 11:51:58 +00:00
Takeshi Nakatani
523043a2aa
Changed base cached time of stat_cache_expire option - #523
2017-03-19 15:19:04 +00:00
Takeshi Nakatani
6fc972972f
Changed clock_gettime func to s3fs_clock_gettime for homebrew - #468
2016-12-04 10:31:41 +00:00
Tony Levi
ab4b92074c
Fix cppcheck complaint
2016-06-30 11:51:25 +09:30
Tony Levi
d57c12d3c3
Possible fix for leaks during entry expiry / truncation ( #340 )
2016-06-28 15:01:14 +09:30
Takeshi Nakatani
34b604cdfe
Fixed a bug about stat_cache_expire - #382
2016-05-14 09:03:52 +00:00
Takeshi Nakatani
84bdd51021
Fixed a bug about etag comparison in stats cache.
2016-03-13 09:29:06 +00:00
Takeshi Nakatani
67efc11d94
Always set stats cache for opened file
2016-03-13 05:43:28 +00:00
Takeshi Nakatani
f81e6103cb
Fixed codes about clock_gettime for osx(3)
2016-02-07 08:27:02 +00:00
Takeshi Nakatani
0755c6f60c
Fixed codes about clock_gettime for osx(2)
2016-02-07 08:10:23 +00:00
Takeshi Nakatani
e01ded9e27
Fixed codes about clock_gettime for osx
2016-02-07 07:40:55 +00:00
Takeshi Nakatani
b90b51f2c5
Changed cache out logic for stat - #340
2016-02-06 09:09:17 +00:00
Takeshi Nakatani
92e52dadd4
Changed and cleaned the logic for debug message.
2015-09-30 19:41:27 +00:00
Andrew Gaul
bcfadbe1a8
Unlock during early return in TruncateCache
...
Found via Coverity. Regression from
dfa63345ed
.
2015-08-19 13:54:14 -07:00
Andrew Gaul
dfa63345ed
Always hold stat_cache_lock when using stat_cache
...
We could further improve this code by holding stat_cache_lock before
calls to DelStat instead of unlocking then relocking it.
2015-08-14 20:14:12 -07:00
Takeshi Nakatani
756d1e5e81
Configure cppcheck #224
2015-08-12 15:04:16 +00:00
Takeshi Nakatani
4f953f9bd7
Clean codes for signature v4 and added new sigv2 option
2015-01-28 17:13:11 +00:00
Takeshi Nakatani
7a7c7572ea
Cleaned up codes for next packaging.
2014-09-07 15:08:27 +00:00
Takeshi Nakatani
5fd33405af
Fixed a bug - issue#5
2014-01-16 16:04:41 +00:00
ggtakec@gmail.com
42b74c9d2e
Changes codes
...
1) Changed codes about memory leak
For memory leak, below codes are changed.
* calls malloc_trim function
* calls initializing NSS function, and adds configure
option "--enable-nss-init".
If libcurl is with NSS, s3fs initializes NSS manually.
This initializing NSS is enabled by "--enable-nss-init"
option at configure. if this option is specified, you
need "nss-devel" package.
* calls initializing libxml2(xmlInitParser).
* BIO functions have memory leak, calls CRYPTO_free_ex_data.
* changes cache structure.
* changes cache out logic to LRU.
* sets alignment for allcated memory in body data structure.
* adds ssl session into share handle. and adds nosscache option.
* deletes unused allocated memory.(bug)
* changes defaule parallel count of head request in readdir
(500->20)
* fixes some bugs.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@482 df820570-a93a-0410-bd06-b72b767a4274
2013-09-14 21:50:39 +00:00
ggtakec@gmail.com
ee01c91e02
Fixed bugs for compiling
...
1) Fixed bugs
Fixes below bugs( format error and undefined fund ).
* 1.72 Will not compile on Ubuntu 12.04.2 (precise) i686(Issue 360)
* complie time error after running #make(Issue 361)
I'll close these Issue if I can confirm that these problem was solved.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@466 df820570-a93a-0410-bd06-b72b767a4274
2013-08-19 06:29:24 +00:00
ggtakec@gmail.com
02c3accb5b
Changes codes
...
1) Changes macros for debugging
Changed macros for debugging messages.
git-svn-id: http://s3fs.googlecode.com/svn/trunk@461 df820570-a93a-0410-bd06-b72b767a4274
2013-08-10 15:29:39 +00:00