Commit a4b09aba authored by Julius Athenstaedt's avatar Julius Athenstaedt
Browse files

GKFS_ Prefix for MAX_OPEN_FDS

parent d441ffa2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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"
+3 −3
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ include(gkfs-utils)
################################################################################
include(gkfs-options)

set(CMAKE_EXPORT_COMPILE_COMMANDS 0)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)


# ##############################################################################
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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"
      }
    },
+1 −1
Original line number Diff line number Diff line
@@ -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:
+1 −1
Original line number Diff line number Diff line
@@ -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();