Commit 7fe3ab07 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'rnou/rename_test' into 'master'

Experimental rename approach

See merge request !133
parents 7fec3e2f f1004a54
Loading
Loading
Loading
Loading
Loading
+2 −1
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
@@ -137,7 +138,7 @@ gkfs:integration:
  needs: ['gkfs']
  parallel:
    matrix:
      - SUBTEST: [ data, status, syscalls, directories, operations, position, shell ]
      - SUBTEST: [ data, status, syscalls, directories, operations, position, shell, rename ]

  script:
    ## run tests
+2 −0
Original line number Diff line number Diff line
@@ -17,6 +17,8 @@ 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)).
- 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

+11 −3
Original line number Diff line number Diff line
@@ -147,11 +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" ON)
if (SYMLINK_SUPPORT)
option(GKFS_SYMLINK_SUPPORT "Compile with support for symlinks" OFF)
if (GKFS_SYMLINK_SUPPORT)
    add_definitions(-DHAS_SYMLINKS)
endif ()
message(STATUS "[gekkofs] Symlink support: ${SYMLINK_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(GKFS_SYMLINK_SUPPORT ON)
    add_definitions(-DHAS_RENAME)
endif ()
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})
+13 −3
Original line number Diff line number Diff line
@@ -270,7 +270,7 @@ Then, the `examples/distributors/guided/generate.py` scrpt is used to create the

Finally, modify `guided_config.txt` to your distribution requirements.

### Metadata Backends
## Metadata Backends

There are two different metadata backends in GekkoFS. The default one uses `rocksdb`, however an alternative based
on `PARALLAX` from `FORTH`
@@ -279,7 +279,7 @@ with `-DGKFS_ENABLE_ROCKSDB:BOOL=OFF`.

Once it is enabled, `--dbbackend` option will be functional.

### Statistics
## Statistics

GekkoFS daemons are able to output general operations (`--enable-collection`) and data chunk
statistics (`--enable-chunkstats`) to a specified output file via `--output-stats <FILE>`. Prometheus can also be used
@@ -287,7 +287,17 @@ instead or in addition to the output file. It must be enabled at compile time vi
argument `-DGKFS_ENABLE_PROMETHEUS` and the daemon argument `--enable-prometheus`. The corresponding statistics are then
pushed to the Prometheus instance.

### Acknowledgment
## Advanced experimental features

### Rename

`-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.

This is disabled by default.

## Acknowledgment

This software was partially supported by the EC H2020 funded NEXTGenIO project (Project ID: 671951, www.nextgenio.eu).

+4 −0
Original line number Diff line number Diff line
@@ -149,6 +149,10 @@ gkfs_getdents64(unsigned int fd, struct linux_dirent64* dirp,
int
gkfs_rmdir(const std::string& path);

#ifdef HAS_RENAME
int
gkfs_rename(const std::string& old_path, const std::string& new_path);
#endif // HAS_RENAME
} // namespace gkfs::syscall

// gkfs_getsingleserverdir is using extern "C" to demangle it for C usage
Loading