Commit dbf851e0 authored by Ramon Nou's avatar Ramon Nou
Browse files

Reduce cmake options

parent 8edfd2b0
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,9 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed 
  - Disabled at_parent/at_fork/at_child as it seems unneded now 
  - Moved some CMAKE options to config.hpp and env variables ([!285](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/285))
    - LIBGKFS/ GKFS _SYMLINK_SUPPORT, _RENAME_SUPPORT and _CREATE_CHECK_PARENTS.
    - Now all the performance options are in config.hpp and env variables.

### Fixed
  - SYS_lstat does not exists on some architectures, change to newfstatat ([!269](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/269))
+0 −22
Original line number Diff line number Diff line
@@ -269,29 +269,7 @@ cmake_dependent_option(GKFS_INSTALL_TESTS "Install GekkoFS self tests" OFF "GKFS
# Variables and options controlling POSIX semantics
################################################################################

## check before create
gkfs_define_option(
    GKFS_CREATE_CHECK_PARENTS
    HELP_TEXT "Enable checking parent directory for existence before creating children"
    DEFAULT_VALUE ON
    DESCRIPTION "Verify that a parent directory exists before creating new files or directories"
)

## symbolic link support
gkfs_define_option(
    GKFS_SYMLINK_SUPPORT
    HELP_TEXT "Enable support for symlinks"
    DEFAULT_VALUE OFF
    DESCRIPTION "Enable support for symbolic links in paths"
)

## rename support
gkfs_define_option(
    GKFS_RENAME_SUPPORT
    HELP_TEXT "Enable support for rename"
    DEFAULT_VALUE OFF
    DESCRIPTION "Compile with support for rename ops (experimental)"
)

## external link support
gkfs_define_option(
+0 −11
Original line number Diff line number Diff line
@@ -299,10 +299,6 @@ if (GKFS_BUILD_DOCUMENTATION)
    add_subdirectory(docs)
endif ()

if (GKFS_SYMLINK_SUPPORT)
    add_definitions(-DHAS_SYMLINKS)
endif ()

if (GKFS_USE_LEGACY_PATH_RESOLVE)
    add_definitions(-DGKFS_USE_LEGACY_PATH_RESOLVE)
endif ()
@@ -311,13 +307,6 @@ if (GKFS_FOLLOW_EXTERNAL_SYMLINKS)
    add_definitions(-DGKFS_FOLLOW_EXTERNAL_SYMLINKS)
endif ()

if (GKFS_RENAME_SUPPORT)
    # Rename depends on symlink support
    add_definitions(-DHAS_SYMLINKS)
    set(GKFS_SYMLINK_SUPPORT ON)
    add_definitions(-DHAS_RENAME)
endif ()

if (GKFS_MAX_INTERNAL_FDS)
    add_definitions(-DGKFS_MAX_INTERNAL_FDS=${GKFS_MAX_INTERNAL_FDS})
endif ()
+1 −4
Original line number Diff line number Diff line
@@ -19,8 +19,7 @@
        "GKFS_BUILD_TESTS": false,
        "GKFS_INSTALL_TESTS": false,
        "GKFS_ENABLE_CLIENT_LOG": true,
        "GKFS_CLIENT_LOG_MESSAGE_SIZE": "1024",
        "GKFS_SYMLINK_SUPPORT": false
        "GKFS_CLIENT_LOG_MESSAGE_SIZE": "1024"
      },
      "warnings": {
        "dev": true,
@@ -75,9 +74,7 @@
        "GKFS_BUILD_TOOLS": true,
        "GKFS_BUILD_TESTS": true,
        "GKFS_INSTALL_TESTS": true,
        "GKFS_SYMLINK_SUPPORT": true,
        "GKFS_ENABLE_PROMETHEUS": true,
        "GKFS_RENAME_SUPPORT": true,
        "GKFS_FOLLOW_EXTERNAL_SYMLINKS": true,
        "GKFS_MAX_OPEN_FDS": "10000",
        "GKFS_MAX_INTERNAL_FDS": "1024"
+7 −3
Original line number Diff line number Diff line
@@ -577,11 +577,8 @@ Once it is enabled, `--dbbackend` option will be functional.
#### Core
- `GKFS_BUILD_TOOLS` - Build tools (default: OFF)
- `GKFS_BUILD_TESTS` - Build tests (default: OFF)
- `GKFS_CREATE_CHECK_PARENTS` - Enable checking parent directory for existence before creating children (default: ON)
- `GKFS_MAX_INTERNAL_FDS` - Number of file descriptors reserved for internal use (default: 256)
- `GKFS_MAX_OPEN_FDS` - Maximum number of open file descriptors supported (default: 1024)
- `GKFS_SYMLINK_SUPPORT` - Enable support for rename (default: OFF)
- `GKFS_RENAME_SUPPORT` - Enable support for rename (default: OFF)
- `GKFS_FOLLOW_EXTERNAL_SYMLINKS` - Enable support for following external links into the GekkoFS namespace (default: OFF)
- `GKFS_USE_LEGACY_PATH_RESOLVE` - Use the legacy implementation of the resolve function, deprecated (default: OFF)
- `GKFS_USE_GUIDED_DISTRIBUTION` - Use guided data distributor (default: OFF)
@@ -607,6 +604,9 @@ The GekkoFS daemon, client, and proxy support a number of environment variables
### Client
#### Core
- `LIBGKFS_HOSTS_FILE` - Path to the hostsfile (created by the daemon and mandatory for the client).
- `LIBGKFS_CREATE_CHECK_PARENTS` - Enable checking parent directory for existence before creating children.
- `LIBGKFS_SYMLINK_SUPPORT` - Enable support for symbolic links.
- `LIBGKFS_RENAME_SUPPORT` - Enable support for rename.
#### Logging
- `LIBGKFS_LOG` - Log module of the client. 
Available modules are: `none`, `syscalls`, `syscalls_at_entry`, `info`, `critical`, `errors`, `warnings`, `mercury`, `debug`, `most`, `all`, `trace_reads`, `help`.
@@ -660,6 +660,10 @@ Using two environment variables
- `LIBGKFS_PROTECT_FILES_CONSUMER=1` enables the application as consumer, so a open will wait until the .lockgekko dissapears. The wait is limited to ~40 seconds. 

### Daemon
#### Core
- `GKFS_DAEMON_CREATE_CHECK_PARENTS` - Enable checking parent directory for existence before creating children.
- `GKFS_DAEMON_SYMLINK_SUPPORT` - Enable support for symbolic links.
- `GKFS_DAEMON_RENAME_SUPPORT` - Enable support for rename.
#### Logging
- `GKFS_DAEMON_LOG_PATH` - Path to the log file of the daemon.
- `GKFS_DAEMON_LOG_LEVEL` - Log level of the daemon. Available levels are: `off`, `critical`, `err`, `warn`, `info`, `debug`, `trace`.
Loading