s3fs-fuse/src
AdamQQQ 3856637cd2
s3fs: add option free_space_ratio to control cache size (#2351)
* Try to cleanup cache directory when initing without enough disk space

Also optimize log messages to print detailed errors to the user.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>

* s3fs: add option free_space_ratio to control cache size

Since the ensure_diskfree option is not convenient enough, we have added
a new option "-o free_space_ratio" to control the space used by the s3fs
cache based on the current disk size.

The value of this option can be between 0 and 100. It will control the
size of the cache according to this ratio to ensure that the idle ratio
of the disk is greater than this value.

For example, when the value is 10 and the disk space is 50GB, it will
ensure that the disk will reserve at least 50GB * 10% = 5GB of remaining
space.

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>

---------

Signed-off-by: Qinqi Qu <quqinqi@linux.alibaba.com>
2023-10-20 18:11:47 +09:00
..
addhead.cpp Own values in add_header (#2285) 2023-08-20 18:59:18 +09:00
addhead.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
autolock.cpp Remove unneeded headers identified by IWYU (#2007) 2022-07-28 23:38:38 +09:00
autolock.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
cache.cpp Fixed errors of cppcheck 2.12.0 2023-09-24 19:55:02 +09:00
cache.h Fixed errors of cppcheck 2.12.0 2023-09-24 19:55:02 +09:00
common_auth.cpp Remove unneeded explicit std::string constructors (#2273) 2023-08-17 22:12:28 +09:00
common.h Enabled to load shared library for Credential and Token (#1927) 2022-10-22 10:42:07 +09:00
curl_handlerpool.cpp Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
curl_handlerpool.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
curl_multi.cpp Fixed errors of cppcheck 2.12.0 2023-09-24 19:55:02 +09:00
curl_multi.h Return std::unique_ptr from S3fsCurl callbacks (#2272) 2023-08-17 22:08:56 +09:00
curl_util.cpp Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
curl_util.h Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
curl.cpp Set SSE headers when checking bucket 2023-10-18 21:45:47 +09:00
curl.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
fdcache_auto.cpp Return errors from AutoFdEntity::Open (#2296) 2023-08-29 22:57:30 +09:00
fdcache_auto.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
fdcache_entity.cpp Fixed a bug in exclusive control of pagelist in FdEntity class 2023-09-26 21:26:17 +09:00
fdcache_entity.h Fixed a bug in exclusive control of pagelist in FdEntity class 2023-09-26 21:26:17 +09:00
fdcache_fdinfo.cpp Changed argument name in ParallelMultipartUploadAll 2023-10-09 13:17:25 +09:00
fdcache_fdinfo.h Changed argument name in ParallelMultipartUploadAll 2023-10-09 13:17:25 +09:00
fdcache_page.cpp Delete copy constructors and assignment operators (#2257) 2023-08-11 13:12:03 +09:00
fdcache_page.h Delete copy constructors and assignment operators (#2257) 2023-08-11 13:12:03 +09:00
fdcache_pseudofd.cpp Updates for clang-tidy 15 (#2058) 2022-11-21 23:29:35 +09:00
fdcache_pseudofd.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
fdcache_stat.cpp Add scope_guard for ad-hoc resource management (#2313) 2023-09-26 07:52:55 +09:00
fdcache_stat.h Return errors from AutoFdEntity::Open (#2296) 2023-08-29 22:57:30 +09:00
fdcache_untreated.cpp Use C++11 emplace where possible (#2240) 2023-07-30 22:51:20 +09:00
fdcache_untreated.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
fdcache.cpp s3fs: add option free_space_ratio to control cache size (#2351) 2023-10-20 18:11:47 +09:00
fdcache.h s3fs: add option free_space_ratio to control cache size (#2351) 2023-10-20 18:11:47 +09:00
gnutls_auth.cpp Use unique_ptr in SSL functions (#2282) 2023-08-19 23:29:00 +09:00
Makefile.am Store mvnode in vector instead of manual linked list (#2312) 2023-09-13 22:32:15 +09:00
metaheader.cpp Fixed a bug when reading a reduced file without flushing (#2133) 2023-03-26 11:45:21 +09:00
metaheader.h Fixed segmentation fault caused by file write failure (#2123) 2023-03-11 16:45:56 +09:00
mpu_util.cpp Fixed errors of cppcheck 2.12.0 2023-09-24 19:55:02 +09:00
mpu_util.h Convert most std::list to std::vector (#2247) 2023-08-05 10:05:32 +09:00
nss_auth.cpp Use unique_ptr in SSL functions (#2282) 2023-08-19 23:29:00 +09:00
openssl_auth.cpp Address unknown pragma warning with GCC (#2324) 2023-09-26 01:16:14 +09:00
psemaphore.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
s3fs_auth.h Use unique_ptr in SSL functions (#2282) 2023-08-19 23:29:00 +09:00
s3fs_cred.cpp s3fs_cred: print detailed error message when stat file fails 2023-10-09 13:11:47 +09:00
s3fs_cred.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
s3fs_extcred.h Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
s3fs_global.cpp Remove more unneeded headers identified by IWYU (#2011) 2022-07-30 12:06:47 +09:00
s3fs_help.cpp s3fs: add option free_space_ratio to control cache size (#2351) 2023-10-20 18:11:47 +09:00
s3fs_help.h Output version and command parameters at startup 2021-03-06 19:11:57 +09:00
s3fs_logger.cpp Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
s3fs_logger.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
s3fs_util.cpp Use std::unique_ptr for fclose (#2318) 2023-09-25 23:55:11 +09:00
s3fs_util.h Add scope_guard for ad-hoc resource management (#2313) 2023-09-26 07:52:55 +09:00
s3fs_xml.cpp Use std::unique_ptr in libxml functions (#2317) 2023-09-25 23:46:52 +09:00
s3fs_xml.h Use std::unique_ptr in libxml functions (#2317) 2023-09-25 23:46:52 +09:00
s3fs.cpp s3fs: add option free_space_ratio to control cache size (#2351) 2023-10-20 18:11:47 +09:00
s3fs.h Source file division and set 4 spaces and cleanup 2020-08-26 17:43:50 +09:00
s3objlist.cpp Remove unneeded explicit std::string constructors (#2273) 2023-08-17 22:12:28 +09:00
s3objlist.h Convert most std::list to std::vector (#2247) 2023-08-05 10:05:32 +09:00
sighandlers.cpp Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
sighandlers.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
string_util.cpp Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
string_util.h Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
test_curl_util.cpp Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
test_page_list.cpp Use C++ enum class for most enums (#2241) 2023-07-30 22:53:17 +09:00
test_string_util.cpp Fixed ETag parsing at completing the Multipart upload part 2023-10-13 11:13:52 +09:00
test_util.h Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
threadpoolman.cpp Use C++11 nullptr instead of 0 or NULL (#2234) 2023-07-27 21:56:58 +09:00
threadpoolman.h Delete unneeded constructors and assignment operators (#2309) 2023-09-06 23:52:10 +09:00
types.h Store mvnode in vector instead of manual linked list (#2312) 2023-09-13 22:32:15 +09:00