Verified Commit f1004a54 authored by Marc Vef's avatar Marc Vef
Browse files

Adding rename support flag for CI cmake and cmake option renaming

parent 3505bc9d
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ gkfs:
      -DGKFS_ENABLE_ROCKSDB:BOOL=ON
      -DGKFS_CHUNK_STATS:BOOL=ON
      -DGKFS_ENABLE_PROMETHEUS:BOOL=ON
      -DGKFS_RENAME_SUPPORT:BOOL=ON
      ${CI_PROJECT_DIR}
    - make -j$(nproc) install
    # reduce artifacts size
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- Support for increasing file size via `truncate()`
  added ([!159](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/159)
- Added PowerPC support ([!151](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/151)).
- RENAME_SUPPORT adds support for renaming files. It includes the use case of renaming opened files using the fd
- GKFS_RENAME_SUPPORT adds support for renaming files. It includes the use case of renaming opened files using the fd
- FLOCK and fcntl functions for locks, are not supported, but they are available.

### Changed
+7 −7
Original line number Diff line number Diff line
@@ -147,19 +147,19 @@ endif()
option(CREATE_CHECK_PARENTS "Check parent directory existance before creating child node" ON)
message(STATUS "[gekkofs] Create checks parents: ${CREATE_CHECK_PARENTS}")

option(SYMLINK_SUPPORT "Compile with support for symlinks" OFF)
if (SYMLINK_SUPPORT)
option(GKFS_SYMLINK_SUPPORT "Compile with support for symlinks" OFF)
if (GKFS_SYMLINK_SUPPORT)
    add_definitions(-DHAS_SYMLINKS)
endif ()
option(RENAME_SUPPORT "Compile with support for rename ops" OFF)
if (RENAME_SUPPORT)
option(GKFS_RENAME_SUPPORT "Compile with support for rename ops" OFF)
if (GKFS_RENAME_SUPPORT)
    # Rename depends on symlink support
    add_definitions(-DHAS_SYMLINKS)
    set(SYMLINK_SUPPORT ON)
    set(GKFS_SYMLINK_SUPPORT ON)
    add_definitions(-DHAS_RENAME)
endif ()
message(STATUS "[gekkofs] Symlink support: ${SYMLINK_SUPPORT}")
message(STATUS "[gekkofs] Rename support: ${RENAME_SUPPORT}")
message(STATUS "[gekkofs] Symlink support: ${GKFS_SYMLINK_SUPPORT}")
message(STATUS "[gekkofs] Rename support: ${GKFS_RENAME_SUPPORT}")

set(MAX_INTERNAL_FDS 256 CACHE STRING "Number of file descriptors reserved for internal use")
add_definitions(-DMAX_INTERNAL_FDS=${MAX_INTERNAL_FDS})
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ pushed to the Prometheus instance.

### Rename

`-DRENAME_SUPPORT` allows the application to rename files.
`-DGKFS_RENAME_SUPPORT` allows the application to rename files.
This is an experimental feature, and some scenarios may not work properly.
Support for fstat in renamed files is included.

+3 −3
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ gkfs_add_python_test(
    SOURCE syscalls/
)

if (RENAME_SUPPORT)
if (GKFS_RENAME_SUPPORT)
gkfs_add_python_test(
    NAME test_rename
    PYTHON_VERSION 3.6
@@ -146,7 +146,7 @@ if(GKFS_INSTALL_TESTS)
            PATTERN "gkfs.io" EXCLUDE
    )

    if(SYMLINK_SUPPORT)
    if(GKFS_SYMLINK_SUPPORT)
        install(DIRECTORY directories
            DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gkfs/tests/integration
            FILES_MATCHING
@@ -223,7 +223,7 @@ if(GKFS_INSTALL_TESTS)
    )
    endif ()

    if (RENAME_SUPPORT)
    if (GKFS_RENAME_SUPPORT)
    install(DIRECTORY rename
        DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gkfs/tests/integration
        FILES_MATCHING