Loading CMake/gkfs-options.cmake +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ if (NOT _GETCONF_MAX_FDS) endif () gkfs_define_variable( MAX_OPEN_FDS GKFS_MAX_OPEN_FDS ${_GETCONF_MAX_FDS} STRING "Maximum number of open file descriptors supported" Loading CMakeLists.txt +3 −3 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ include(gkfs-utils) ################################################################################ include(gkfs-options) set(CMAKE_EXPORT_COMPILE_COMMANDS 0) set(CMAKE_EXPORT_COMPILE_COMMANDS 1) # ############################################################################## Loading Loading @@ -270,8 +270,8 @@ if(GKFS_MAX_INTERNAL_FDS) add_definitions(-DGKFS_MAX_INTERNAL_FDS=${GKFS_MAX_INTERNAL_FDS}) endif() if(MAX_OPEN_FDS) add_definitions(-DMAX_OPEN_FDS=${MAX_OPEN_FDS}) if(GKFS_MAX_OPEN_FDS) add_definitions(-DGKFS_MAX_OPEN_FDS=${GKFS_MAX_OPEN_FDS}) endif() if(ENABLE_CLIENT_LOG) Loading CMakePresets.json +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ "GKFS_CHUNK_STATS": true, "GKFS_ENABLE_PROMETHEUS": true, "GKFS_RENAME_SUPPORT": true, "MAX_OPEN_FDS": "10000", "GKFS_MAX_OPEN_FDS": "10000", "GKFS_MAX_INTERNAL_FDS": "1024" } }, Loading include/client/preload_context.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ enum class RelativizeStatus { internal, external, fd_unknown, fd_not_a_dir }; */ class PreloadContext { static auto constexpr MIN_INTERNAL_FD = MAX_OPEN_FDS - GKFS_MAX_INTERNAL_FDS; static auto constexpr MIN_INTERNAL_FD = GKFS_MAX_OPEN_FDS - GKFS_MAX_INTERNAL_FDS; static auto constexpr MAX_USER_FDS = MIN_INTERNAL_FD; private: Loading src/client/preload.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ init_preload() { // happens during our internal initialization, there's no way for us to // control this creation and the fd will be created in the // [0, MAX_USER_FDS) range rather than in our private // [MAX_USER_FDS, MAX_OPEN_FDS) range. To prevent this for our internal // [MAX_USER_FDS, GKFS_MAX_OPEN_FDS) range. To prevent this for our internal // initialization code, we forcefully occupy the user fd range to force // such modules to create fds in our private range. CTX->protect_user_fds(); Loading Loading
CMake/gkfs-options.cmake +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ if (NOT _GETCONF_MAX_FDS) endif () gkfs_define_variable( MAX_OPEN_FDS GKFS_MAX_OPEN_FDS ${_GETCONF_MAX_FDS} STRING "Maximum number of open file descriptors supported" Loading
CMakeLists.txt +3 −3 Original line number Diff line number Diff line Loading @@ -121,7 +121,7 @@ include(gkfs-utils) ################################################################################ include(gkfs-options) set(CMAKE_EXPORT_COMPILE_COMMANDS 0) set(CMAKE_EXPORT_COMPILE_COMMANDS 1) # ############################################################################## Loading Loading @@ -270,8 +270,8 @@ if(GKFS_MAX_INTERNAL_FDS) add_definitions(-DGKFS_MAX_INTERNAL_FDS=${GKFS_MAX_INTERNAL_FDS}) endif() if(MAX_OPEN_FDS) add_definitions(-DMAX_OPEN_FDS=${MAX_OPEN_FDS}) if(GKFS_MAX_OPEN_FDS) add_definitions(-DGKFS_MAX_OPEN_FDS=${GKFS_MAX_OPEN_FDS}) endif() if(ENABLE_CLIENT_LOG) Loading
CMakePresets.json +1 −1 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ "GKFS_CHUNK_STATS": true, "GKFS_ENABLE_PROMETHEUS": true, "GKFS_RENAME_SUPPORT": true, "MAX_OPEN_FDS": "10000", "GKFS_MAX_OPEN_FDS": "10000", "GKFS_MAX_INTERNAL_FDS": "1024" } }, Loading
include/client/preload_context.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -77,7 +77,7 @@ enum class RelativizeStatus { internal, external, fd_unknown, fd_not_a_dir }; */ class PreloadContext { static auto constexpr MIN_INTERNAL_FD = MAX_OPEN_FDS - GKFS_MAX_INTERNAL_FDS; static auto constexpr MIN_INTERNAL_FD = GKFS_MAX_OPEN_FDS - GKFS_MAX_INTERNAL_FDS; static auto constexpr MAX_USER_FDS = MIN_INTERNAL_FD; private: Loading
src/client/preload.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -266,7 +266,7 @@ init_preload() { // happens during our internal initialization, there's no way for us to // control this creation and the fd will be created in the // [0, MAX_USER_FDS) range rather than in our private // [MAX_USER_FDS, MAX_OPEN_FDS) range. To prevent this for our internal // [MAX_USER_FDS, GKFS_MAX_OPEN_FDS) range. To prevent this for our internal // initialization code, we forcefully occupy the user fd range to force // such modules to create fds in our private range. CTX->protect_user_fds(); Loading