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

Merge branch 'jathenst/fuse' into 'master'

Jathenst/fuse

FUSE client

See merge request !264
parents f44a154c 02e36810
Loading
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -62,6 +62,9 @@ gkfs:
    - sed -i 's/constexpr bool use_dentry_cache = false;/constexpr bool use_dentry_cache = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    #- sed -i 's/constexpr auto zero_buffer_before_read = false;/constexpr auto zero_buffer_before_read = true;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    #- sed -i 's/constexpr auto implicit_data_removal = true;/constexpr auto implicit_data_removal = false;/g' "${CI_PROJECT_DIR}/include/config.hpp"
    # install libfuse
    - apt-get update
    - apt-get install -y libfuse3-dev fuse3
    # use ccache
    - ccache --zero-stats -M 750MiB -F 800 --evict-older-than 10d
    - /usr/sbin/update-ccache-symlinks
@@ -156,7 +159,7 @@ gkfs:integration:
  needs: ['gkfs']  # we need to remove gkfs dependencies on manual
  parallel:
    matrix:
      - SUBTEST: [ data, status, syscalls, directories, operations, position, shell, rename, migration, startup, error_handling, resilience, compatibility ]
      - SUBTEST: [ data, status, syscalls, directories, operations, position, shell, rename, migration, startup, error_handling, resilience, compatibility, fuse ]
  rules:
    - if: '$CI_MERGE_REQUEST_EVENT_TYPE == "detached"'
      when: never
+4 −0
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
    - New sfind filtering in the server side
  - Added new tests (and enabling failing ones) to increase coverage
  - Added docker image (release) for 0.9.6 ([!279](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/279))
  - Added FUSE support([!264](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/264))
    - fuse_client mounting a virtual path exists, avoiding usage of LD_PRELOAD.
    - Added tests for FUSE support
    


### Changed 
+7 −0
Original line number Diff line number Diff line
@@ -248,6 +248,13 @@ gkfs_define_option(
    DEFAULT_VALUE ON
)

# build fuse client for gekkofs
gkfs_define_option(
    GKFS_BUILD_FUSE
    HELP_TEXT "Build FUSE client"
    DEFAULT_VALUE ON
)

# use old resolve function
gkfs_define_option(
    GKFS_USE_LEGACY_PATH_RESOLVE
+5 −0
Original line number Diff line number Diff line
@@ -234,6 +234,11 @@ find_package(Threads REQUIRED)
# details transparently
find_package(Filesystem REQUIRED)

find_package(PkgConfig REQUIRED)
pkg_check_modules(FUSE3 REQUIRED fuse3)
include_directories(${FUSE3_INCLUDE_DIRS})
link_directories(${FUSE3_LIBRARY_DIRS})
add_definitions(${FUSE3_CFLAGS_OTHER})

# Search for 'source-only' dependencies
###############################################################################
+31 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ to I/O, which reduces interferences and improves performance.
    - [Interposition library via system call interception](#interposition-library-via-system-call-interception)
    - [Interposition library via libc call interception](#interposition-library-via-libc-call-interception)
    - [User library via linking against the application](#user-library-via-linking-against-the-application)
    - [FUSE client](#fuse-client)
  - [Logging](#logging)
- [Advanced and experimental features](#advanced-and-experimental-features)
  - [Rename](#rename)
@@ -266,6 +267,36 @@ GekkoFS offers a user library that can be linked against the application, which

In this case, `LD_PRELOAD` is not necessary. Nevertheless, `LIBGKFS_HOSTS_FILE` is still required.

### FUSE client

The GekkoFS FUSE client provides a way to mount the GekkoFS file system and access it as a standard mount point without using `LD_PRELOAD`.

tl;dr example:

```bash
export LIBGKFS_HOSTS_FILE=<hostfile_path>
mkdir <mount_dir_path>
<install_path>/bin/fuse_client -f -s <mount_dir_path>
```

The `fuse_client` requires the `LIBGKFS_HOSTS_FILE` environment variable to be set. It also accepts standard FUSE arguments.

Common launch arguments:
- `-f`: Run in foreground.
- `-s`: Single-threaded operation (recommended).
- `<mount_dir_path>`: The directory where GekkoFS will be mounted.

FUSE-specific options can be passed via `-o`:
- `writeback`: Enable writeback cache.
- `direct_io`: Enable direct I/O (can boost performance significantly).
- `timeout=<seconds>`: Caching timeout (default: 1.0).
- `cache={never,auto,always}`: Cache policy.

Example with options:
```bash
<install_path>/bin/fuse_client -f -s <mount_dir_path> -o writeback,direct_io,timeout=5.0
```

## Logging

The following environment variables can be used to enable logging in the client library: `LIBGKFS_LOG=<module>`
Loading