pax_global_header00006660000000000000000000000064150540605460014517gustar00rootroot0000000000000052 comment=aa8a671eaaf522d6a06864a01e66a6562d3d20e1 saunafs-5.1.2/000077500000000000000000000000001505406054600131645ustar00rootroot00000000000000saunafs-5.1.2/.clang-format000066400000000000000000000014361505406054600155430ustar00rootroot00000000000000--- # Complete list of style options can be found at: # http://clang.llvm.org/docs/ClangFormatStyleOptions.html BasedOnStyle: Google Standard: Latest IndentWidth: 4 TabWidth: 4 UseTab: ForIndentation AccessModifierOffset: -4 DerivePointerAlignment: false PointerAlignment: Right IndentCaseLabels: false # All enumerators in their own line AllowShortEnumsOnASingleLine: false # Respects common/platform.h if it is in a separated group of includes IncludeBlocks: Preserve # Clang Format doesn't support adding a semicolon to the end of a single for # loop. Instead, we must use braces until it does. AllowShortLoopsOnASingleLine: true AllowShortBlocksOnASingleLine: Always # Avoid breaking string literals BreakStringLiterals: false # Use maximum 100 characters per line ColumnLimit: 100 ... saunafs-5.1.2/.clang-tidy000066400000000000000000000021041505406054600152150ustar00rootroot00000000000000# # -modernize-use-trailing-return-type, # -modernize-use-nodiscard, # -modernize-avoid-bind, # -modernize-use-transparent-functors, # -modernize-use-bool-literals, # -modernize-use-uncaught-exceptions, # -modernize-use-noexcept, # -modernize-concat-nested-namespaces, # -modernize-deprecated-headers, # -modernize-raw-string-literal, # -modernize-replace-random-shuffle, # -modernize-use-nullptr, # -modernize-use-override, # -modernize-use-using, # # -cppcoreguidelines-pro-type-vararg, # -cppcoreguidelines-avoid-magic-numbers, # -cppcoreguidelines-pro-bounds-pointer-arithmetic, # -readability-magic-numbers, # -misc-non-private-member-variables-in-classes, Checks: "-*, bugprone-*, -bugprone-easily-swappable-parameters, cert-*, -cert-err58-cpp clang-analyzer-*, cppcoreguidelines-*, -google-*, -llvm*, misc-*, -misc-non-private-member-variables-in-classes, modernize-*, -modernize-use-trailing-return-type, -modernize-use-nodiscard, performance-*, portability-*, readability-*," WarningsAsErrors: '' HeaderFilterRegex: '' FormatStyle: file saunafs-5.1.2/.codespellrc000066400000000000000000000004721505406054600154670ustar00rootroot00000000000000[codespell] # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = .git*,*.pdf,*.svg,*.css,.codespellrc,external check-hidden = true # Words with mixed casing ignore-regex = \b[A-Z]*[a-z]+[A-Z][A-Za-z]*\b|/mnt/[a-z0-9]+|.*\bcodespell-ignore\b.* ignore-words-list = oce,nd,inout,thid,indx saunafs-5.1.2/.dockerignore000066400000000000000000000022231505406054600156370ustar00rootroot00000000000000*~ .DS_Store .git # Vim files # ############# .clang_complete tags *.taghl compile_commands.json .ycm_extra_conf.py # Commonly used build directory # ################################# /_packages/ /build* /cmake-build-* /install/ /test_output/ # Eclipse project files # ######################### /.project /.cproject /.settings # Jetbrains IDE project files # ############################### /.idea # KDevelop4 project file # ########################## *.kdev4 # QtCreator user profiles # ########################### *.user # Debian builds # ################# /Makefile /debian/files /debian/*.debhelper /debian/*.substvars /debian/*.debhelper.log /debian/debhelper-build-stamp /debian/saunafs-adm/ /debian/saunafs-cgi/ /debian/saunafs-cgiserv/ /debian/saunafs-chunkserver/ /debian/saunafs-client/ /debian/saunafs-client3/ /debian/saunafs-common/ /debian/saunafs-dbg/ /debian/saunafs-lib-client/ /debian/saunafs-master/ /debian/saunafs-metalogger/ /debian/saunafs-nfs-ganesha/ /debian/saunafs-uraft/ /debian/tmp/ /saunafs-bundle-* # Mypy # ######## .mypy_cache # VSCode # ########## .vscode # clangd # ########## .cache # Test setup # ############## tests/hdd* saunafs-5.1.2/.editorconfig000066400000000000000000000011771505406054600156470ustar00rootroot00000000000000# Top most .editorconfig file root = true # Unix-style newlines with a newline ending every file [*] charset = utf-8 end_of_line = lf indent_size = 4 indent_style = space insert_final_newline = true trim_trailing_whitespace = true # Tab indentation for shell scripts, Dockerfiles and Makefiles [{*.{bash,sh},Dockerfile,Dockerfile.*,Makefile,*.mk}] indent_style = tab # Unsupported in some editors keep_padding = true space_redirects = true # Tab indentation for C/C++ files [*.{c,cc,h,cpp,hpp,c++,h++,cxx,hxx}] indent_style = tab # Markdown files should allow trailing whitespace [*.{md,markdown,txt}] trim_trailing_whitespace = false saunafs-5.1.2/.git-blame-ignore-revs000066400000000000000000000001471505406054600172660ustar00rootroot00000000000000# Bulk chore changes ea997c44624c82bfc1326d0cf6bd357c094d8de5 6ff82eea1161e77f0456dbec4025e3fee91ca67b saunafs-5.1.2/.github/000077500000000000000000000000001505406054600145245ustar00rootroot00000000000000saunafs-5.1.2/.github/instructions/000077500000000000000000000000001505406054600172705ustar00rootroot00000000000000saunafs-5.1.2/.github/instructions/cpp.instructions.md000066400000000000000000000015351505406054600231430ustar00rootroot00000000000000--- applyTo: '**/*.{c,cc,cpp,h,hpp}' --- # C/C++ standard * The C code should be written using C23 standard. * The C++ code should be written using C++23 standard. # Header inclusions * All files should include `common/platform.h` as the first include followed by a new line. This header is required for platform-specific definitions and configurations. * Then all the system and external libraries should be included in a separate group. * Then all the project-specific headers should be included in a separate group. * The project-specific headers inclusions are relative to the `src` directory. For instance, the header in `src/common/foo.h` should be included as `#include "common/foo.h"`. * All groups should be sorted alphabetically. # Code style * The code style for C and C++ is defined in the file `.clang-format` in the root of the project. saunafs-5.1.2/.github/workflows/000077500000000000000000000000001505406054600165615ustar00rootroot00000000000000saunafs-5.1.2/.github/workflows/cleanup-cache.yml000066400000000000000000000013661505406054600220020ustar00rootroot00000000000000name: cleanup caches by a branch on: pull_request_target: types: - closed jobs: cleanup: runs-on: ubuntu-latest steps: - name: Cleanup run: | echo "Fetching list of cache key" cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id') ## Setting this to not fail the workflow while deleting cache keys. set +e echo "Deleting caches..." for cacheKey in $cacheKeysForPR do gh cache delete $cacheKey done echo "Done" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_REPO: ${{ github.repository }} BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge saunafs-5.1.2/.github/workflows/codespell.yml000066400000000000000000000007671505406054600212700ustar00rootroot00000000000000# Codespell configuration is within .codespellrc --- name: Codespell on: push: branches: [dev] pull_request: branches: [dev] permissions: contents: read jobs: codespell: name: Check for spelling errors runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Annotate locations with typos uses: codespell-project/codespell-problem-matcher@v1 - name: Codespell uses: codespell-project/actions-codespell@v2 saunafs-5.1.2/.github/workflows/pull-requests.yml000066400000000000000000000003631505406054600221330ustar00rootroot00000000000000name: Conventional Commits on: pull_request: branches: [ dev ] jobs: build: name: Conventional Commits runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: webiny/action-conventional-commits@v1.3.0 saunafs-5.1.2/.github/workflows/run-unit-and-ganesha-tests.yml000066400000000000000000000137321505406054600243770ustar00rootroot00000000000000name: Run Unit and Ganesha Tests on: merge_group: pull_request: push: branches: - dev jobs: Run-Unit-Tests-and-Ganesha: runs-on: ubuntu-24.04 env: SAUNAFS_TEST_TIMEOUT_MULTIPLIER: 2 steps: - name: Checkout repository uses: actions/checkout@v4 with: submodules: true fetch-depth: 0 - name: ccache uses: hendrikmuhs/ccache-action@v1.2 with: create-symlink: true # Reference for previous vcpkg setup: maybe we can fix it in the future #- name: Setup a new (or from cache) vcpkg # uses: lukka/run-vcpkg@v11 - name: Install nfs-ganesha v4.3 from Ubuntu repository run: | sudo apt update sudo apt install -y nfs-common nfs-ganesha nfs-ganesha-vfs - name: Set up Python uses: actions/setup-python@v4 with: python-version: "3.x" - name: Install SaunaFS dependencies, setup environment and build run: | sudo mkdir /mnt/hd{b,c,d} cd $GITHUB_WORKSPACE/tests sudo ./setup_machine.sh setup /mnt/hdb /mnt/hdc /mnt/hdd - name: Cache vcpkg downloads uses: actions/cache@v4 with: path: | ~/.cache/vcpkg key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json') }} restore-keys: | ${{ runner.os }}-vcpkg- - name: Setup vcpkg and install dependencies run: | $GITHUB_WORKSPACE/utils/vcpkg_setup.sh vcpkg install --triplet x64-linux - name: Build SaunaFS run: | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" source /var/lib/saunafs_setup_machine_venv/bin/activate mkdir -p build cd build nice cmake \ -DCMAKE_TOOLCHAIN_FILE="${HOME}/vcpkg/scripts/buildsystems/vcpkg.cmake" \ -DENABLE_CLIENT_LIB=ON \ -DENABLE_DOCS=ON \ -DENABLE_NFS_GANESHA=ON \ -DENABLE_POLONAISE=OFF \ -DENABLE_URAFT=ON \ -DGSH_CAN_HOST_LOCAL_FS=ON \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}/install/saunafs/" \ -DENABLE_TESTS=ON \ -DCODE_COVERAGE=OFF \ -DSAUNAFS_TEST_POINTER_OBFUSCATION=ON \ -DENABLE_WERROR=ON \ -DENABLE_FOUNDATIONDB=ON \ "${GITHUB_WORKSPACE}" make -j"$(nproc)" install - name: Enable systemd core dumps run: | sudo mkdir -p /etc/systemd/coredump.conf.d echo -e "[Coredump]\nStorage=external\nProcessSizeMax=2G" | sudo tee /etc/systemd/coredump.conf.d/coredump.conf sudo systemctl daemon-reexec - name: Run Unit Tests suite run: | "${GITHUB_WORKSPACE}/build/src/unittests/unittests" --gtest_color=yes - name: Run Ganesha suite run: | sudo chmod o+xr /home/runner/ sudo chown saunafstest:saunafstest /mnt/saunafstest_loop_* sudo chown saunafstest:saunafstest /mnt/hd{b,c,d} SCRIPT="${GITHUB_WORKSPACE}/tests/ci_build/run-ganesha-tests.sh" chmod +x "${SCRIPT}" sudo bash -c "ulimit -c unlimited && exec '${SCRIPT}'" - name: Analyze core dump with coredumpctl if: failure() run: | echo "===== Searching for recent core dumps for ganesha.nfsd =====" echo "Recent coredumps:" coredumpctl --no-pager list | tail -n 5 || true COREDUMP_INFO=$(coredumpctl --no-pager list ganesha.nfsd | tail -n 1 || true) if [ -z "$COREDUMP_INFO" ]; then echo "No core dump found for ganesha.nfsd" exit 0 fi PID=$(echo "$COREDUMP_INFO" | awk '{print $5}') echo "Found core dump for ganesha.nfsd with PID: $PID" # Dump the core CORE_PATH="/tmp/core.ganesha-nfsd.${PID}" echo "Dumping core to: $CORE_PATH" if ! sudo coredumpctl dump "$PID" --output="$CORE_PATH"; then echo "Error: coredumpctl failed to dump core for PID $PID" exit 1 fi # Find the binary BIN_PATH=$(coredumpctl info "$PID" | grep 'Executable:' | awk '{print $2}') echo "Executable path: $BIN_PATH" if [ ! -f "$BIN_PATH" ]; then echo "Binary not found at $BIN_PATH" exit 1 fi # Generate backtrace BACKTRACE_FILE="${CORE_PATH}.backtrace.txt" echo "Generating backtrace to $BACKTRACE_FILE" if ! gdb -batch -ex "thread apply all bt full" -ex "info registers" -ex "quit" \ "$BIN_PATH" "$CORE_PATH" > "$BACKTRACE_FILE" 2> "${BACKTRACE_FILE}.stderr"; then echo "Error: gdb failed to generate backtrace. See ${BACKTRACE_FILE}.stderr for details." exit 1 fi echo "===== Core Dump Backtrace (first 200 lines) =====" head -n 200 "$BACKTRACE_FILE" - name: Upload core dump and backtrace if: failure() uses: actions/upload-artifact@v4 with: name: core-dump-ganesha path: | /tmp/core.ganesha-nfsd.* if-no-files-found: warn saunafs-5.1.2/.gitignore000066400000000000000000000032401505406054600151530ustar00rootroot00000000000000*~ .DS_Store # External libraries # ###################### /external/googletest-release-1.7.0 /external/nfs-ganesha-* /external/ntirpc-* /external/spdlog-0.14.0 # Vim files # ############# .clang_complete tags *.taghl compile_commands.json .ycm_extra_conf.py # Commonly used build directory # ################################# /_packages/ /build* /cmake-build-* /install/ /test_output/ # Eclipse project files # ######################### /.project /.cproject /.settings # Jetbrains IDE project files # ############################### /.idea # KDevelop4 project file # ########################## *.kdev4 # QtCreator user profiles # ########################### *.user # Debian builds # ################# /Makefile /debian/files /debian/*.debhelper /debian/*.substvars /debian/*.debhelper.log /debian/debhelper-build-stamp /debian/saunafs-adm/ /debian/saunafs-cgi/ /debian/saunafs-cgiserv/ /debian/saunafs-chunkserver/ /debian/saunafs-client/ /debian/saunafs-client3/ /debian/saunafs-common/ /debian/saunafs-dbg/ /debian/saunafs-lib-client/ /debian/saunafs-master/ /debian/saunafs-metalogger/ /debian/saunafs-nfs-ganesha/ /debian/saunafs-uraft/ /debian/tmp/ /saunafs-bundle-* # Mypy # ######## .mypy_cache # VSCode # ########## .vscode # clangd # ########## .cache # submodules # ############## src/chunkserver/plugins/zonefs_disk src/chunkserver/plugins/ice_disk_energy_manager tests/ci_build/run-smr-tests.sh tests/test_suites/SMRTests tests/test_suites/ICETests # Windows # ########### src/mount/windows create-win-release.bat deliver-win-release.bat # Test setup # ############## tests/hdd* # vcpkg # ############## vcpkg_installed # CMake # ############## CMakeUserPresets.json saunafs-5.1.2/.gitmodules000066400000000000000000000001141505406054600153350ustar00rootroot00000000000000[submodule "vcpkg"] path = vcpkg url = https://github.com/microsoft/vcpkg saunafs-5.1.2/CMakeLists.txt000066400000000000000000000443701505406054600157340ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.20) project(saunafs LANGUAGES C CXX) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_C_STANDARD 23) set(CMAKE_C_STANDARD_REQUIRED ON) # Enable symbol export for loadable modules, ensuring same shared resource # references. Needed for the plugins, as they are shared libraries. set(CMAKE_ENABLE_EXPORTS ON) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) message(FATAL_ERROR "In-source builds are disabled for this project. This is for your " "safety. To build the project, please create a build tree in " "a separate directory, for example:\n" " mkdir ${CMAKE_SOURCE_DIR}/build\n" " cd ${CMAKE_SOURCE_DIR}/build\n" " cmake ..\n" "Before doing that you may need to clean up after this try by removing " "CMakeCache.txt file and CMakeFiles/ directory.\n" "If you REALLY need an in-source build, remove this check from " "${CMAKE_CURRENT_LIST_FILE} and try again." ) endif() option(ENABLE_WERROR "Enable treating compilation warnings as errors" OFF) option(ENABLE_LIGHTSFS "Enable light version of SaunaFS" OFF) option(ENABLE_UTILS "Enable building additional binaries used e.g. in tests" OFF) option(ENABLE_TESTS "Enable building unit and functional tests" OFF) option(ENABLE_DOCS "Enable building the documentation" ON) option(ENABLE_EXIT_ON_USR1 "Enable handler for SIGUSR1 which calls exit()" OFF) option(THROW_INSTEAD_OF_ABORT "Throw std::exception instead of calling abort" OFF) option(ENABLE_DEBUG_LOG "Enable prefix based debug logs" OFF) option(ENABLE_URAFT "Enable installation of uraft util" ON) option(ENABLE_VERBOSE_ASCIIDOC "Enable verbose output of asciidoc" OFF) option(ENABLE_TCMALLOC "Enable use of tcmalloc-minimal library" OFF) option(ENABLE_JEMALLOC "Enable use of jemalloc library" OFF) option(ENABLE_POLONAISE "Enable polonaise" ON) option(ENABLE_CLIENT_LIB "Enable dynamic client library (libsaunafs-client)" OFF) # end of SaunaFS options option(ENABLE_TRACES "Enable traces" OFF) option(ENABLE_SYSLOG_FOR_TRACES "Enable usage of syslog instead of stdout for traces" OFF) option(ENABLE_CRC "Enable checksums" ON) option(ENABLE_REQUEST_LOG "Enable logging request times" OFF) option(USE_LEGACY_READ_MESSAGES "Enable sending old type of messages by mount" OFF) option(ENABLE_NFS_GANESHA "Enable nfs-ganesha plugin" OFF) option(ENABLE_CCACHE "Enable ccache during compilation" ON) option(ENABLE_NFS_ACL_SUPPORT "Enable nfs-ganesha ACL support" ON) option(ENABLE_COMPILE_COMMANDS "Enable generation of compile_commands.json" ON) option(ENABLE_PROMETHEUS "Enable prometheus metrics" ON) # Experimental option(ENABLE_INODE64 "Enable 64 bits for inode numbers and quantities" OFF) option(ENABLE_FOUNDATIONDB "Enable FoundationDB experimental support" OFF) option(GENERATE_GIT_INFO "Generate git info from current repository (for version commands)" ON) # If enabled (default), the file compile_commands.json is generated in the build # directory. Tools like clangd and vscode use this file for proper analysis. set(CMAKE_EXPORT_COMPILE_COMMANDS ${ENABLE_COMPILE_COMMANDS}) find_program(CCACHE_FOUND ccache) message(STATUS "ENABLE_CCACHE: ${ENABLE_CCACHE}") message(STATUS "CCACHE_FOUND: ${CCACHE_FOUND}") if(ENABLE_CCACHE AND CCACHE_FOUND) set(CMAKE_C_COMPILER_LAUNCHER ccache) set(CMAKE_CXX_COMPILER_LAUNCHER ccache) message(STATUS "Using ccache") endif() set(DEFAULT_MIN_VERSION "5.1.2") include(GNUInstallDirs) set(BIN_SUBDIR "${CMAKE_INSTALL_FULL_BINDIR}") set(SBIN_SUBDIR "${CMAKE_INSTALL_FULL_SBINDIR}") set(LIB_SUBDIR "${CMAKE_INSTALL_FULL_LIBDIR}") set(MAN_SUBDIR "${CMAKE_INSTALL_FULL_MANDIR}") set(CGI_SUBDIR "${CMAKE_INSTALL_FULL_DATAROOTDIR}/sfscgi") set(INCL_SUBDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}/saunafs") set(ETC_SUBDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/saunafs") set(RUN_SUBDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run/saunafs") set(DATA_SUBDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/saunafs") set(USR_SHARE_DOC "${CMAKE_INSTALL_FULL_DATAROOTDIR}/doc/") set(EXAMPLES_SUBDIR "examples") set(CHUNKSERVER_NAME "saunafs-chunkserver") set(CLIENT_NAME "saunafs-client") set(METALOGGER_NAME "saunafs-metalogger") set(MASTER_NAME "saunafs-master") set(URAFT_NAME "saunafs-uraft") string(REGEX REPLACE "/$" "" USR_SHARE_DOC_NO_SLASH "${USR_SHARE_DOC}") set(CHUNKSERVER_EXAMPLES_SUBDIR "${USR_SHARE_DOC_NO_SLASH}/${CHUNKSERVER_NAME}/${EXAMPLES_SUBDIR}") set(CLIENT_EXAMPLES_SUBDIR "${USR_SHARE_DOC_NO_SLASH}/${CLIENT_NAME}/${EXAMPLES_SUBDIR}") set(METALOGGER_EXAMPLES_SUBDIR "${USR_SHARE_DOC_NO_SLASH}/${METALOGGER_NAME}/${EXAMPLES_SUBDIR}") set(SFSMASTER_EXAMPLES_SUBDIR "${USR_SHARE_DOC_NO_SLASH}/${MASTER_NAME}/${EXAMPLES_SUBDIR}") set(URAFT_EXAMPLES_SUBDIR "${USR_SHARE_DOC_NO_SLASH}/${URAFT_NAME}/${EXAMPLES_SUBDIR}") # Aliases set(SBIN_PATH "${SBIN_SUBDIR}") set(LIB_PATH "${LIB_SUBDIR}") set(PLUGINS_PATH "${LIB_PATH}/saunafs/plugins") set(BUILD_PATH "${CMAKE_BINARY_DIR}") set(CGI_PATH "${CGI_SUBDIR}") set(ETC_PATH "${ETC_SUBDIR}") set(DATA_PATH "${DATA_SUBDIR}") set(DEFAULT_USER "saunafs" CACHE STRING "Default user to run daemons as") set(DEFAULT_GROUP "saunafs" CACHE STRING "Default group to run daemons as") set(DEFAULT_MASTER_HOSTNAME "sfsmaster" CACHE STRING "Default master server hostname") set(DEFAULT_MASTER_PORT "9421" CACHE STRING "Default master server port number") set(DEFAULT_MOUNTED_SUBFOLDER "/" CACHE STRING "Default subfolder to be mounted") set(DEFAULT_SFSMOUNT_CONFIG_PATH "${ETC_PATH}/sfsmount.cfg" CACHE STRING "Default full path to sfsmount configuration file") set(SAUNAFS_BLOCKS_IN_CHUNK "1024" CACHE STRING "Number of blocks in one chunk") set(SAUNAFS_BLOCK_SIZE "65536" CACHE STRING "Number of bytes in one block") message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}") message(STATUS "DEFAULT_USER: ${DEFAULT_USER}") message(STATUS "DEFAULT_GROUP: ${DEFAULT_GROUP}") message(STATUS "SAUNAFS_BLOCKS_IN_CHUNK: ${SAUNAFS_BLOCKS_IN_CHUNK}") message(STATUS "SAUNAFS_BLOCK_SIZE: ${SAUNAFS_BLOCK_SIZE}") message(STATUS "ENABLE_WERROR: ${ENABLE_WERROR}") message(STATUS "ENABLE_LIGHTSFS: ${ENABLE_LIGHTSFS}") message(STATUS "ENABLE_UTILS: ${ENABLE_UTILS}") message(STATUS "ENABLE_TESTS: ${ENABLE_TESTS}") message(STATUS "ENABLE_DOCS: ${ENABLE_DOCS}") message(STATUS "ENABLE_EXIT_ON_USR1: ${ENABLE_EXIT_ON_USR1}") message(STATUS "THROW_INSTEAD_OF_ABORT: ${THROW_INSTEAD_OF_ABORT}") message(STATUS "ENABLE_DEBUG_LOG: ${ENABLE_DEBUG_LOG}") message(STATUS "ENABLE_VERBOSE_ASCIIDOC: ${ENABLE_VERBOSE_ASCIIDOC}") message(STATUS "ENABLE_TCMALLOC: ${ENABLE_TCMALLOC}") message(STATUS "ENABLE_JEMALLOC: ${ENABLE_JEMALLOC}") message(STATUS "ENABLE_POLONAISE: ${ENABLE_POLONAISE}") message(STATUS "ENABLE_CLIENT_LIB: ${ENABLE_CLIENT_LIB}") message(STATUS "ENABLE_URAFT: ${ENABLE_URAFT}") # end of SaunaFS options values message(STATUS "ENABLE_TRACES: ${ENABLE_TRACES}") message(STATUS "ENABLE_SYSLOG_FOR_TRACES: ${ENABLE_SYSLOG_FOR_TRACES}") message(STATUS "ENABLE_CRC: ${ENABLE_CRC}") message(STATUS "ENABLE_REQUEST_LOG: ${ENABLE_REQUEST_LOG}") message(STATUS "USE_LEGACY_READ_MESSAGES: ${USE_LEGACY_READ_MESSAGES}") message(STATUS "ENABLE_NFS_GANESHA: ${ENABLE_NFS_GANESHA}") message(STATUS "ENABLE_COMPILE_COMMANDS: ${CMAKE_EXPORT_COMPILE_COMMANDS}") message(STATUS "ENABLE_INODE64: ${ENABLE_INODE64}") message(STATUS "ENABLE_FOUNDATIONDB: ${ENABLE_FOUNDATIONDB}") if(ENABLE_INODE64) add_definitions(-DSAUNAFS_USE_INODE64) endif() if(ENABLE_TESTS) if(NOT THROW_INSTEAD_OF_ABORT) message(STATUS "Tests require THROW_INSTEAD_OF_ABORT to be set to YES, changing passed value:") set(THROW_INSTEAD_OF_ABORT YES) message(STATUS "THROW_INSTEAD_OF_ABORT: ${THROW_INSTEAD_OF_ABORT}") endif() if(NOT ENABLE_CLIENT_LIB) message(STATUS "Tests require ENABLE_CLIENT_LIB to be set to YES, changing passed value:") set(ENABLE_CLIENT_LIB YES) message(STATUS "ENABLE_CLIENT_LIB: ${ENABLE_CLIENT_LIB}") endif() set(BUILD_TESTS ON) set(BUILD_UTILS ON) set(SAUNAFS_ENABLE_DEBUG_LOG ON) endif() if(ENABLE_CLIENT_LIB) set(ENABLE_PIC_TARGETS ON) endif() if(CMAKE_BUILD_TYPE STREQUAL "coverage" OR CODE_COVERAGE) if("${CMAKE_C_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?[Cc]lang") message("Building with llvm Code Coverage Tools") find_program(LLVM_COV_PATH llvm-cov) if(NOT LLVM_COV_PATH) message(FATAL_ERROR "llvm-cov not found! Aborting.") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fprofile-instr-generate -fcoverage-mapping") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping") elseif("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU") message("Building with lcov Code Coverage Tools") if(NOT (CMAKE_BUILD_TYPE STREQUAL "Debug")) message(WARNING "Code coverage results with an optimized (non-Debug) build may be misleading") endif() find_program(LCOV_PATH NAMES lcov lcov.bat lcov.exe lcov.perl) if(NOT LCOV_PATH) message(FATAL_ERROR "lcov not found! Aborting...") endif() find_program(GENHTML_PATH NAMES genhtml genhtml.perl genhtml.bat) if(NOT GENHTML_PATH) message(FATAL_ERROR "genhtml not found! Aborting...") endif() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage -fprofile-arcs -ftest-coverage") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage -fprofile-arcs -ftest-coverage") else() message(FATAL_ERROR "Code coverage requires Clang or GCC. Aborting.") endif() endif() string(TIMESTAMP BUILD_TIMESTAMP) add_compile_definitions(BUILD_TIME="${BUILD_TIMESTAMP}") if(VERSION_SUFFIX) set(PACKAGE_VERSION "${DEFAULT_MIN_VERSION}${VERSION_SUFFIX}") else() set(PACKAGE_VERSION "${DEFAULT_MIN_VERSION}-dev") endif() string(REGEX MATCH "^([0-9]+)\\.([0-9]+)\\.([0-9]+)" PACKAGE_VERSION_MATCH ${PACKAGE_VERSION}) set(PACKAGE_VERSION_MAJOR ${CMAKE_MATCH_1}) set(PACKAGE_VERSION_MINOR ${CMAKE_MATCH_2}) set(PACKAGE_VERSION_MICRO ${CMAKE_MATCH_3}) message(STATUS "PACKAGE_VERSION: ${PACKAGE_VERSION}") message(STATUS "PACKAGE_VERSION_MAJOR: ${PACKAGE_VERSION_MAJOR}") message(STATUS "PACKAGE_VERSION_MINOR: ${PACKAGE_VERSION_MINOR}") message(STATUS "PACKAGE_VERSION_MICRO: ${PACKAGE_VERSION_MICRO}") if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() if(CMAKE_SYSTEM_NAME STREQUAL "SunOS") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64" ) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m64") endif() if(GIT_COMMIT) add_compile_definitions(GIT_COMMIT="${GIT_COMMIT}") elseif(GENERATE_GIT_INFO) execute_process(COMMAND "git" "rev-parse" "HEAD" OUTPUT_VARIABLE GIT_COMMIT OUTPUT_STRIP_TRAILING_WHITESPACE) add_compile_definitions(GIT_COMMIT="${GIT_COMMIT}") else() add_compile_definitions(GIT_COMMIT="N/A") endif() if(GIT_BRANCH) add_compile_definitions(GIT_BRANCH="${GIT_BRANCH}") elseif(GENERATE_GIT_INFO) execute_process(COMMAND "git" "rev-parse" "--abbrev-ref" "HEAD" OUTPUT_VARIABLE GIT_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE) add_compile_definitions(GIT_BRANCH="${GIT_BRANCH}") else() add_compile_definitions(GIT_BRANCH="N/A") endif() if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") set(LINUX ON) set(UNIX ON) endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") if (LINUX) set(PLATFORM "LINUX") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-strict-aliasing") find_library(LIBDL dl) # module loader endif(LINUX) if(MINGW) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat=0") endif() string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pipe -pthread -Wall -Wextra -Werror -Wpedantic -fwrapv") set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -DNDEBUG -g") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -O2 -ftree-vectorize -g -fno-omit-frame-pointer") set(CMAKE_CXX_FLAGS_COVERAGE "-O0 -g --coverage") set(CMAKE_CXX_FLAGS_CLANG_ANALYZE "--analyze -Xanalyzer -analyzer-output=text") set(CMAKE_CXX_FLAGS_CLANG_SANITIZE_THREAD "-g -O0 -fsanitize=thread") set(CMAKE_CXX_FLAGS_CXXDEBUG "-O0 -g -D_GLIBCXX_DEBUG") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall") add_definitions(-D_LARGEFILE_SOURCE) add_definitions(-D_FILE_OFFSET_BITS=64) add_definitions(-DSAUNAFS_HAVE_CONFIG_H) add_definitions(-D__STDC_LIMIT_MACROS) add_definitions(-D__STDC_CONSTANT_MACROS) add_definitions(-D__STDC_FORMAT_MACROS) # Disable default stdout logger, enabling it breaks some features of SaunaFS # Enable it on your own responsibility add_definitions(-DSPDLOG_DISABLE_DEFAULT_LOGGER) add_definitions(-DSPDLOG_FMT_EXTERNAL) add_definitions(-DFMT_HEADER_ONLY) if(MINGW) add_definitions(-DWINVER=0x0602) add_definitions(-D_WIN32_WINNT=0x0602) add_definitions(-DFD_SETSIZE=1024) endif() # All the environment tests (libs, includes, etc.) live here: include(EnvTests) include(Libraries) include(CollectSources) include(CreateUnitTest) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments") endif() if(CXX_HAS_WNOGNU) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-gnu") endif() if(ENABLE_LIGHTSFS) set(PROTO_BASE 65536) set(LIGHT_SFS 1) else() set(PROTO_BASE 0) set(LIGHT_SFS 0) endif() if(ENABLE_UTILS) set(BUILD_UTILS ON) endif() if(ENABLE_DEBUG_LOG) set(SAUNAFS_ENABLE_DEBUG_LOG ON) endif() if(NOT Boost_INCLUDE_DIRS) message(FATAL_ERROR "Boost headers are required") endif() if(ENABLE_TRACES) add_definitions(-DENABLE_TRACES) if (ENABLE_SYSLOG_FOR_TRACES) add_definitions(-DENABLE_SYSLOG_FOR_TRACES) endif() endif() if(ENABLE_REQUEST_LOG) if(NOT Boost_IOSTREAMS_FOUND) message(FATAL_ERROR "Boost iostreams is required if request time logging is enabled") endif() set(ADDITIONAL_LIBS ${Boost_IOSTREAMS_LIBRARY}) add_definitions(-DENABLE_REQUEST_LOG) endif() set(CHARTS_CSV_CHARTID_BASE 90000) if(THROW_INSTEAD_OF_ABORT) add_definitions(-DTHROW_INSTEAD_OF_ABORT) endif() if(USE_LEGACY_READ_MESSAGES) add_definitions(-DUSE_LEGACY_READ_MESSAGES) endif() if(ENABLE_CRC) message(STATUS "CRC checksums enabled") add_definitions(-DENABLE_CRC) else() message(STATUS "CRC checksums disabled") endif() set(CHARTS_CSV_CHARTID_BASE 90000) # Internal capability required by some FSALs set(GSH_CAN_HOST_LOCAL_FS ${ENABLE_NFS_GANESHA}) if (ENABLE_PROMETHEUS AND NOT PROMETHEUS_CPP_ENABLE_PULL) message(STATUS "Prometheus C++ Client Library: Enabled but not found") elseif(ENABLE_PROMETHEUS) add_definitions(-DHAVE_PROMETHEUS) message(STATUS "Prometheus C++ Client Library: Enabled") else() message(STATUS "Prometheus C++ Client Library: Disabled") endif() # Create config.h file configure_file(config.h.in config.h) include_directories(${CMAKE_BINARY_DIR}) # Here we have generated config.h # main.cc shared by some SaunaFS applications set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/main/main.cc) if(ZLIB_FOUND) include_directories(${ZLIB_INCLUDE_DIRS}) endif() include_directories(src) # Allow paths relative to src, eg. #include common/crc.h link_directories(${LINK_DIRECTORIES} ${FUSE_LIBRARY_DIR}) set(ICON_RESOURCE_FILE "") if(MINGW) option(ENABLE_WINFSP_WINCLIENT "Enable winfsp library based windows client build" ON) if(ENABLE_WINFSP_WINCLIENT) set(WINFSP_FUSE3_INCLUDE_DIR "C:/Program Files (x86)/WinFsp/inc/fuse3" CACHE STRING "winfsp installation /inc directory") set(WINFSP_FUSE_DLL "C:/Program Files (x86)/WinFsp/bin/winfsp-x64.dll" CACHE STRING "winfsp-fuse dll for specific arch") set(WINFSP_FUSE_LIBRARY "C:/Program Files (x86)/WinFsp/lib/winfsp-x64.lib" CACHE STRING "winfsp-fuse lib for specific arch") endif() set(ICON_RESOURCE_FILE "${CMAKE_SOURCE_DIR}/src/mount/windows/resources/icons/icon.rc") endif() add_subdirectory(external) add_subdirectory(src/admin) add_subdirectory(src/config) add_subdirectory(src/errors) add_subdirectory(src/slogger) add_subdirectory(src/metrics) add_subdirectory(src/common) add_subdirectory(src/protocol) add_subdirectory(src/tools) add_subdirectory(src/mount) if(ENABLE_POLONAISE) add_subdirectory(src/mount/polonaise) endif() if(NOT MINGW) if(BUILD_DEVTOOLS) add_subdirectory(src/devtools) endif() add_subdirectory(src/chunkserver) add_subdirectory(src/kv) if(ENABLE_FOUNDATIONDB) add_subdirectory(src/fdb) endif() add_subdirectory(src/master) add_subdirectory(src/metadump) add_subdirectory(src/metalogger) add_subdirectory(src/metarestore) if (FUSE_LIBRARY OR FUSE3_LIBRARY) add_subdirectory(src/mount/fuse) endif() add_subdirectory(src/data) add_subdirectory(src/cgi) if(BUILD_UTILS) add_subdirectory(utils) endif() if(ENABLE_DOCS) add_subdirectory(doc) endif() if(ENABLE_NFS_GANESHA) add_subdirectory(src/nfs-ganesha) endif() endif() if (ENABLE_URAFT) add_subdirectory(src/uraft) endif() # 'src/unittests' should be the last to be added to guarantee that all unit # tests are included. # Otherwise, some unit tests could not be generated, like uraft's ones. if(BUILD_TESTS) add_subdirectory(src/unittests) add_subdirectory(tests) endif() include(Packing) include(GoogleTest) saunafs-5.1.2/CMakePresets.json000066400000000000000000000170731505406054600164150ustar00rootroot00000000000000{ "version": 6, "cmakeMinimumRequired": { "major": 3, "minor": 19 }, "configurePresets": [ { "name": "default", "generator": "Unix Makefiles", "binaryDir": "${sourceDir}/build/saunafs", "installDir": "${sourceDir}/install/saunafs/", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo", "CODE_COVERAGE": "OFF", "ENABLE_CLIENT_LIB": "ON", "ENABLE_DOCS": "ON", "ENABLE_NFS_GANESHA": "ON", "ENABLE_POLONAISE": "OFF", "ENABLE_TESTS": "ON", "ENABLE_URAFT": "ON", "ENABLE_WERROR": "ON", "GSH_CAN_HOST_LOCAL_FS": "ON", "SAUNAFS_TEST_POINTER_OBFUSCATION": "ON", "ENABLE_INODE64": "OFF", "ENABLE_FOUNDATIONDB": "ON" }, "hidden": true }, { "name": "vcpkg", "toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake", "hidden": true }, { "name": "windows", "inherits": ["default", "vcpkg"], "generator": "MinGW Makefiles", "cacheVariables": { "CMAKE_MAKE_PROGRAM": "C:/msys64/mingw64/bin/mingw32-make.exe", "CMAKE_C_COMPILER": "C:/msys64/mingw64/bin/gcc.exe", "CMAKE_CXX_COMPILER": "C:/msys64/mingw64/bin/g++.exe", "SOCKET_LIBRARIES": "C:/msys64/mingw64/lib/libws2_32.a", "VCPKG_TARGET_TRIPLET": "x64-mingw-static", "VCPKG_DEFAULT_TRIPLET": "x64-mingw-static", "VCPKG_HOST_TRIPLET": "x64-mingw-static", "CMAKE_BUILD_TYPE": "RelWithDebInfo", "ENABLE_DOCS": "OFF", "ENABLE_CLIENT_LIB": "OFF", "ENABLE_URAFT": "OFF", "ENABLE_NFS_GANESHA": "OFF", "GSH_CAN_HOST_LOCAL_FS": "OFF", "ENABLE_POLONAISE": "OFF", "ENABLE_TESTS": "OFF", "ENABLE_PROMETHEUS": "OFF", "ENABLE_NFS_ACL_SUPPORT": "OFF", "CODE_COVERAGE": "OFF", "SAUNAFS_TEST_POINTER_OBFUSCATION": "OFF", "ENABLE_WERROR": "ON", "ENABLE_FOUNDATIONDB": "OFF" } }, { "name": "debug", "binaryDir": "${sourceDir}/build/saunafs/debug", "cacheVariables": { "CMAKE_BUILD_TYPE": "Debug" }, "inherits": "default" }, { "name": "coverage", "binaryDir": "${sourceDir}/build/saunafs/coverage", "cacheVariables": { "CODE_COVERAGE": "ON" }, "inherits": "default" }, { "name": "test", "inherits": "default" }, { "name": "release", "binaryDir": "${sourceDir}/build/saunafs/release", "cacheVariables": { "CMAKE_INSTALL_PREFIX": "/", "ENABLE_TESTS": "OFF", "ENABLE_WERROR": "OFF", "SAUNAFS_TEST_POINTER_OBFUSCATION": "OFF", "ENABLE_FOUNDATIONDB": "OFF" }, "inherits": "default" }, { "name": "debug-vcpkg", "inherits": ["debug", "vcpkg"] }, { "name": "release-vcpkg", "inherits": ["release", "vcpkg"] }, { "name": "coverage-vcpkg", "inherits": ["coverage", "vcpkg"] }, { "name": "test-vcpkg", "inherits": ["test", "vcpkg"] } ], "buildPresets": [ { "name": "default", "hidden": true }, { "name": "windows", "configurePreset": "windows", "inherits": ["default"] }, { "name": "test", "configurePreset": "test", "inherits": ["default"] }, { "name": "debug", "configurePreset": "debug", "inherits": ["default"] }, { "name": "coverage", "configurePreset": "coverage", "inherits": ["default"] }, { "name": "release", "configurePreset": "release", "inherits": ["default"] }, { "name": "debug-vcpkg", "configurePreset": "debug-vcpkg", "inherits": ["default"] }, { "name": "release-vcpkg", "configurePreset": "release-vcpkg", "inherits": ["default"] }, { "name": "coverage-vcpkg", "configurePreset": "coverage-vcpkg", "inherits": ["default"] }, { "name": "test-vcpkg", "configurePreset": "test-vcpkg", "inherits": ["default"] } ], "workflowPresets": [ { "name": "debug", "steps": [ { "type": "configure", "name": "debug" }, { "type": "build", "name": "debug" } ] }, { "name": "windows", "steps": [ { "type": "configure", "name": "windows" }, { "type": "build", "name": "windows" } ] }, { "name": "release", "steps": [ { "type": "configure", "name": "release" }, { "type": "build", "name": "release" } ] }, { "name": "test", "steps": [ { "type": "configure", "name": "test" }, { "type": "build", "name": "test" } ] }, { "name": "coverage", "steps": [ { "type": "configure", "name": "coverage" }, { "type": "build", "name": "coverage" } ] }, { "name": "debug-vcpkg", "steps": [ { "type": "configure", "name": "debug-vcpkg" }, { "type": "build", "name": "debug-vcpkg" } ] }, { "name": "release-vcpkg", "steps": [ { "type": "configure", "name": "release-vcpkg" }, { "type": "build", "name": "release-vcpkg" } ] }, { "name": "coverage-vcpkg", "steps": [ { "type": "configure", "name": "coverage-vcpkg" }, { "type": "build", "name": "coverage-vcpkg" } ] }, { "name": "test-vcpkg", "steps": [ { "type": "configure", "name": "test-vcpkg" }, { "type": "build", "name": "test-vcpkg" } ] } ] } saunafs-5.1.2/CONTRIBUTING.md000066400000000000000000000371011505406054600154170ustar00rootroot00000000000000 # Contributing to SaunaFS First off, thanks for taking the time to contribute! All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. > And if you like the project, but just don't have time to contribute, that's > fine. There are other easy ways to support the project and show your > appreciation, which we would also be very happy about: > - Star the project > - Refer this project in your project's readme > - Mention the project at local meetups and tell your friends/colleagues ## Table of Contents - [I Have a Question](#i-have-a-question) - [I Want to Contribute](#i-want-to-contribute) - [Reporting Bugs](#reporting-bugs) - [Suggesting Enhancements](#suggesting-enhancements) - [Grammar/Typos/Nitpicks](#grammar) - [Styleguides](#styleguides) - [Commit Messages](#commit-messages) - [Conventional Commits Specification](#conventional-commits-specification) - [Code Style Guides](#code-style-guides) - [Feature Level Atomicity to Keep the History Clean](#feature-level-atomicity-to-keep-the-history-clean) - [Break the Build, Then Fix It!](#break-the-build-then-fix-it) - [Definition of Done](#definition-of-done) - [Attribution](#attribution) ## I Have a Question > If you want to ask a question, we assume that you have read the available > [Documentation](https://docs.saunafs.com) and the [man files]. Before you ask a question, it is best to search for existing [Issues](https://github.com/leil-io/saunafs/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. If you then still feel the need to ask a question and need clarification, we recommend the following: - Open an [Issue](https://github.com/leil-io/saunafs/issues/new). - Provide as much context as you can about what you're running into. - Include all the technical details that seem relevant e.g. project version (s), platform (if needed). We will then take care of the issue as soon as possible. You might also consider joining the [Slack channel](https://join.slack.com/t/saunafs/shared_invite/zt-2dktkrdwm-1BHZje_DMX3NQdxO9HoYog) to ask questions and discuss the project. ## I Want to Contribute > ### Legal Notice > When contributing to this project, you must agree that you have authored 100% > of the content and that you have the necessary rights to the content. ### Reporting Bugs #### Before Submitting a Bug Report A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. - Make sure that you are using the latest version. - Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://docs.saunafs.com) and the [man files](https://github.com/leil-io/saunafs/tree/main/doc). If you are looking for support, you might want to check [this section](#i-have-a-question)). - To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [issue tracker](https://github.com/leil-io/saunafs/issues?q=is%3Aissue+label%3Abug). - Also make sure to search the internet (including Stack Overflow) to see if users outside the GitHub community have discussed the issue. - Collect information about the bug: - Stack trace (Traceback) - OS, Platform and Version - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. - Possibly your input and the output - Can you reliably reproduce the issue? And can you also reproduce it with older versions? #### How Do I Submit a Good Bug Report? We use GitHub issues to track bugs and errors. If you run into an issue with the project: - Open an [Issue](https://github.com/leil-io/saunafs/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) - Explain the behavior you would expect and the actual behavior. - Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. - Provide the information you collected in the previous section. Once it's filed: - The project team will label the issue accordingly. - A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. After some time without reproduction, we will probably close the issue. - If the team is able to reproduce the issue, it will be marked as a `bug`, as well as possibly other tags (such as `critical`). - The team will then work on fixing the issue and will keep you updated on the progress. - Alternatively, you can also contribute a fix for the issue. In this case, you should follow the guidelines for [contributing code](#contributing-code). ### Suggesting Enhancements This section guides you through submitting an enhancement suggestion for SaunaFS, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. #### Before Submitting an Enhancement - Make sure that you are using the latest version. - Read the [documentation](https://docs.saunafs.com) carefully and find out if the functionality is already covered, maybe by an individual configuration. - Perform a [search](https://github.com/leil-io/saunafs/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. #### How Do I Submit a Good Enhancement Suggestion? Enhancement suggestions are tracked as [GitHub issues](https://github.com/leil-io/saunafs/issues). - Use a **clear and descriptive title** for the issue to identify the suggestion. - Provide a **step-by-step description of the suggested enhancement** in as many details as possible. - **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point, tell which alternatives do not work for you. You might want to use images and/or animations to enhance the description of your ideas. - **Explain why this enhancement would be useful** to most SaunaFS users. Point to other projects that have solved similar issue better and would serve as inspiration. ### Grammar/Typos/Nitpicks If you notice a typo, grammatical error, or potentially a small improvement to make in the code, we encourage you to post it in the mega issue for [grammar/typos/nitpicks](https://github.com/leil-io/saunafs/issues/6) instead of creating a pull request or another issue. This is to to keep both the issue tracker and the pull requests clean and focused. Each release we will address the issues in this mega issue and include the fixes in one commit. We will credit all contributors in the commit message as co-authors. ### Contributing code/PR's for a feature/bug fix The best way to contribute is by creating a PR. However, before you start developing, ask us first if it's something we would accept (so to not waste your time or the team's). Currently, the preferred ways to indicate you want to contribute code are (in order): * Commenting on a specific Github issue * [Slack](https://join.slack.com/t/saunafs/shared_invite/zt-2dktkrdwm-1BHZje_DMX3NQdxO9HoYog), * [Email](mailto:contact@saunafs.com?subject=RFI), If you get an OK from us, please read below for more details. ## Style guides ### Commit Messages - **Title:** Give a descriptive summary, use [conventional commits specification](#conventional-commits-specification). - Imperative, start uppercase, no period at the end, no more than 50 chars. - Remember blank line between title and body. - **Body:** Explain why and what (not how), include task ID, wrap at 72 chars. - **At the end:** Include Co-authored-by for all contributors. - Remember at least one blank line before it. - Format: Co-authored-by: name ### Conventional Commits Specification The Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history, making it easier to write automated tools on top of. This convention integrates with SemVer, by describing the features, fixes, and breaking changes made in commit messages. The commit message should be structured as follows: > <type> [(optional scope)]: <descriptive summary> > > <body> > > [optional footer(s)] The commit contains the following structural elements, to communicate intent to the consumers of your library: * **type:** is based on the [Angular Convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines) and has following main options: **fix:, feat:, build:, chore:, ci:, docs:, style:, refactor:, perf:, test:,** and others. A commit of the type **fix:** patches a bug in your codebase (this correlates with [PATCH in Semantic Versioning](http://semver.org/#summary)), as a commit of the type **feat:** introduces a new feature to the codebase (this correlates with [MINOR in Semantic Versioning](http://semver.org/#summary)). * **scope** is one or more component name(s), referring to domains changed (mount, chunkserver, nfs-ganesha, tests, master, ...) * **footer(s)** - **BREAKING CHANGE: <description>** introduces a breaking change (correlating with [MAJOR in Semantic Versioning](http://semver.org/#summary)). A Footers other than **BREAKING CHANGE:** may be provided, following a convention similar to [git trailer format](https://git-scm.com/docs/git-interpret-trailers). ### Code Style Guides You should format your code using clang-format with the included `.clang-format` file, which specifies the settings we use (We mostly use the Google style with a few modifications). See the [clang-format](https://clang.llvm.org/docs/ClangFormat.html) documentation for more details. ### Feature Level Atomicity to Keep the History Clean When introducing a new feature, aim to propose the pull request to protected branches (e.g., dev, main) in a clean and organized manner. This often involves squashing WIP (Work In Progress) commits to include only those with relevant new code. In such cases, avoid retaining commits that simply amend earlier ones. For example, if you have a pull request with 10 commits, and commit 2 contains an error that was fixed in commit 8, it is unnecessary to keep both commits in protected branches. Only the code that correctly adds value should be preserved. The level of commit atomicity differs for existing code and is usually based on bug fixes, feature improvements, and similar factors. It is common to have commits that amend older ones already present in protected branches. ### Break the Build, Then Fix It If the changes you introduce break the pipeline, it is your responsibility, as the author of those changes, to fix it. While you can seek assistance from the team, and seeking assistance is welcome, the primary responsibility for fixing the issue rests with you. Restoring the functionality of the pipeline is a top team priority, and help is available as soon as possible when needed. Code reviews for changes within a broken pipeline are counterproductive; no code within a broken pipeline will be reviewed or approved for merging. If a merge has already occurred, it must be promptly fixed or reverted. Despite what has been mentioned, don't hesitate to intentionally break the pipeline – in fact, we encourage it! Please, go ahead and break it! Then, proceed to promptly fix it. ### Definition of Done The team should reach a consensus on what "done" means to ensure consistent quality and a shared understanding among all members. A developer submits a change for peer review once they deem the task complete and ready for production delivery. To facilitate this, we provide a checklist for a development task that must be satisfied before it is considered for peer review: - The new code should have some test coverage, either unit or integration tests. - All automated tests must pass. - The build job must be in a healthy state. ### Developer Certificate of Origin Before we accept your PR, we want you to sign-off your commit(s) with a valid GPG key. See the git manual for more info. This indicates that you accept the text below. ``` Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. 1 Letterman Drive Suite D4700 San Francisco, CA, 94129 Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. ``` ## Attribution - [Chris Beams - How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/) - [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) - [Semantic Versioning](https://semver.org/#summary) - [Angular Convention](https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines) - [Git Trailer Format](https://git-scm.com/docs/git-interpret-trailers) saunafs-5.1.2/COPYING000066400000000000000000001043741505406054600142300ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . saunafs-5.1.2/INSTALL.md000066400000000000000000000120641505406054600146170ustar00rootroot00000000000000# INSTALL - SaunaFS You can install SaunaFS from pre-built packages or from source. The pre-built packages are currently available for the following platforms: - Linux (x86_64) - Ubuntu 24.04 (Noble) - Ubuntu 22.04 (Jammy) Please follow the instructions below to install SaunaFS on your system. ## Installing from pre-built packages ### Ubuntu 22.04/24.04 1. Import the public key used to sign the packages: ```shell gpg --no-default-keyring \ --keyring /usr/share/keyrings/saunafs-archive-keyring.gpg \ --keyserver hkps://keyserver.ubuntu.com \ --receive-keys 0xA80B96E2C79457D4 ``` It will create a new keyring file `/usr/share/keyrings/saunafs-archive-keyring.gpg` and import the public key used to sign the packages. Please, notice that at the time of writing, [the use of apt-key deprecated](https://opensource.com/article/22/9/deprecated-linux-apt-key) You can verify the keyring file by running the following command: ```shell gpg --no-default-keyring \ --keyring /usr/share/keyrings/saunafs-archive-keyring.gpg \ --list-keys ``` 2. Add the SaunaFS repository to your system: The repository is available at for Ubuntu 24.04 or for Ubuntu 22.04. For Ubuntu 24.04, use: ```shell cat | sudo tee /etc/apt/sources.list.d/saunafs.list <") } else { GIT_COMMIT_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', returnStdout: true ).trim() def userId = slackUserIdFromEmail(GIT_COMMIT_EMAIL) if (userId?.trim()) { slackSend( color: "warning", channel: "$userId", message: "<$BUILD_URL|$userMsg>" ) } else { echo "Failed to retrieve Slack user ID for email: ${GIT_COMMIT_EMAIL}" } } } def slackGoodMessage(userMsg) { if (env.BRANCH_NAME == 'dev') { // No need to alert if everything works :) return } // We still want to alert developers that a pipeline passed def userId = slackUserIdFromEmail(GIT_COMMIT_EMAIL) if (userId?.trim()) { slackSend( color: "good", channel: "$userId", message: "<$BUILD_URL|$userMsg>" ) } else { echo "Failed to retrieve Slack user ID for email: ${GIT_COMMIT_EMAIL}" } } pipeline { agent none parameters { booleanParam( name: 'DEPLOY_PACKAGE_TO_EXPERIMENTAL', defaultValue: false, description: 'Build and deploy packages to EXPERIMENTAL' ) string( name: 'DEBIAN_PACKAGE_REF', defaultValue: 'dev', description: 'If deploying packages, what leil-io/debian-package reference to use?' ) } options { skipStagesAfterUnstable() // TODO: Add more lenient rules for dev buildDiscarder(logRotator(artifactDaysToKeepStr: "7", artifactNumToKeepStr: "2")) parallelsAlwaysFailFast() } tools { go '1.22.2' } stages { stage('Get build metadata') { agent {label 'linux'} steps { checkout scm script { GIT_COMMIT_EMAIL = sh( script: 'git --no-pager show -s --format="%ae"', returnStdout: true ).trim() GIT_COMMIT_HASH = sh( script: 'git rev-parse HEAD', returnStdout: true, ).trim() } } post { cleanup { cleanWs(cleanWhenNotBuilt: true, deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true, ) } } } stage('Build and test') { parallel { stage('Build with clang') { agent {label 'build'} steps { checkout scm script { sh """ docker buildx build --tag saunafs-clang-build:latest -f tests/docker/Dockerfile.test $WORKSPACE """ } } post { failure { slackBadMessage( "clang failed to build on ${BRANCH_NAME}", "clang failed on branch ${BRANCH_NAME}, build number ${BUILD_NUMBER}" ) } cleanup { cleanWs(cleanWhenNotBuilt: true, deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true, ) sh """ docker image rm saunafs-clang-build || true """ } } } stage('Build Ubuntu 22.04') { environment { SANITY_WORKERS = "${env.SANITY_WORKERS ?: '4'}" SHORT_WORKERS = "${env.SHORT_WORKERS ?: '4'}" LONG_WORKERS = "${env.LONG_WORKERS ?: '4'}" MACHINE_MULTIPLIER = "${env.MACHINE_MULTIPLIER ?: '5'}" REGISTRY_IMAGE_NAME = "${REGISTRY_URL}/ubuntu22.04-saunafs-test:$GIT_COMMIT" } agent { label "build" } stages { stage("Checkout source") { steps { checkout scm } } stage('Build image') { steps { script { buildImage("ubuntu:22.04") pushImage(env.REGISTRY_IMAGE_NAME) } } } } post { // Clean after build failure { slackBadMessage( "Ubuntu 22.04 build failed on ${BRANCH_NAME}", "Ubuntu 22.04 build failed on branch ${BRANCH_NAME}, build number ${BUILD_NUMBER}" ) } cleanup { cleanWs(cleanWhenNotBuilt: true, deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true, ) sh """ docker image rm ${env.REGISTRY_IMAGE_NAME} || true docker image rm saunafs-test:latest || true """ } } } stage('Build Ubuntu 24.04') { agent { label "test && ubuntu-2404" } environment { SANITY_WORKERS = "${env.SANITY_WORKERS ?: '4'}" SHORT_WORKERS = "${env.SHORT_WORKERS ?: '4'}" LONG_WORKERS = "${env.LONG_WORKERS ?: '4'}" MACHINE_MULTIPLIER = "${env.MACHINE_MULTIPLIER ?: '5'}" REGISTRY_IMAGE_NAME = "${REGISTRY_URL}/ubuntu24.04-saunafs-test:$GIT_COMMIT" } stages { stage("Checkout source") { steps { checkout scm } } stage('Build sfstests') { steps { buildSfstests() } } stage('Build image') { steps { script { buildImage("ubuntu:24.04") pushImage(env.REGISTRY_IMAGE_NAME) } } } stage('Run Sanity') { steps { runSanity() } } stage('Run FoundationDB tests') { steps { runFoundationDB() } } stage('Run short system tests') { steps { runShort() } } stage('Run machine tests') { when { anyOf { branch 'dev' branch 'gh-readonly-queue/*' branch 'stable' changeRequest() } } steps { runMachine() } } stage('Run long system tests') { when { anyOf { branch 'dev' branch 'gh-readonly-queue/*' branch 'stable' changeRequest() } } steps { runLong() } } } post { unstable { script { slackBadMessage( "Tests failed to pass on ${BRANCH_NAME}", "Tests failed on branch ${BRANCH_NAME}, build number ${BUILD_NUMBER}" ) } } failure { script { slackBadMessage( "Ubuntu 24.04 pipeline failed on ${BRANCH_NAME}", "Ubuntu 24.04 pipeline failed on branch ${BRANCH_NAME}, build number ${BUILD_NUMBER}" ) } } success { script { slackGoodMessage( "Ubuntu 24.04 pipeline passed on branch ${BRANCH_NAME}, build number ${BUILD_NUMBER}" ) } } // Clean after build cleanup { cleanWs(cleanWhenNotBuilt: true, deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true, ) sh ''' docker rm $(docker stop $(docker ps -a -q --filter ancestor=saunafs-test --format="{{.ID}}")) || true ''' sh """ docker image rm ${env.REGISTRY_IMAGE_NAME} || true docker image rm saunafs-test:latest || true """ } } } } } stage('Deploy packages to dev repository') { agent none when { anyOf { branch "dev" expression { return params.DEPLOY_PACKAGE_TO_EXPERIMENTAL } } } steps { script { def repo = params.DEPLOY_PACKAGE_TO_EXPERIMENTAL ? "Experimental" : "Development" build ( job: 'SaunaFS Packages (Dev)', parameters: [ string(name: 'PACKAGE_REF', value: params.DEBIAN_PACKAGE_REF), string(name: 'SAUNAFS_REF', value: GIT_COMMIT_HASH), string(name: 'REPOSITORY', value: repo) ] ) } } } } } saunafs-5.1.2/NEWS000066400000000000000000001240551505406054600136720ustar00rootroot00000000000000This file lists noteworthy changes in SaunaFS. * SaunaFS (5.1.2) (2025-08-21) - Revert "Write several blocks per hdd write job" from 5.1.0 * SaunaFS (5.1.1) (2025-08-21) - fix(uRaft): Handle missing URAFT_ELECTOR_MODE (#537) * SaunaFS (5.1.0) (2025-08-14) - build: Fix master not building on gcc12 when prometheus missing (#401) - build(uraft): Update boost functions to work with boost 1.87 (#310) - build: Fix Windows build after refactor of fsconnect (#486) - feat: Add a dedicated jobPool for replications (#491) - feat(common): Add initial signal-slots support (#507) - feat(cs): Release old iobuffers (#519) - feat(cs): Write several blocks per hdd write job (#504) - fix(cgi): Fix multi chunkservers table (#375) - fix(charts): Fix wrong range value for CSV (#520) - fix(chunkserver): Use malloc_trim to reduce RAM usage (#481) - fix: Fix write algorithm in delayed init mode (#496) - fix(ganesha): Fix lock type conversion in setlk (#517) - fix(ganesha): Prevent segfault in lock operations (#505) - fix(mds): Add init function to metadata backends (#475) - fix(mount): Fix path by inode consistency (#503) - fix(mount): Fix readahead under high latency (#514) - fix(mount): Redirect info messages to stdout (#493) - fix(protocol): Fix some protocol inconsistencies (#477) - fix(tools): Remove warning regarding -l option in setgoal (#498) - fix(wireshark): Fix wireshark plugin build (#350) * SaunaFS (5.0.3) (2025-08-21) - fix(uRaft): Handle missing URAFT_ELECTOR_MODE (#537) * SaunaFS (5.0.2) (2025-07-15) - fix(chunkserver): Fallback to old registration if needed (#489) * SaunaFS (5.0.1) (2025-07-12) - fix: Check master version for write algorithm (#488) * SaunaFS (5.0.0) (2025-07-10) - feat(cmake): Make FDB optional (#478) - feat(mds): Separate changelogs from metadata backend (#471) - feat(mds,chunkserver): Add CLUSTER_ID config var (#452) - feat!(mds,chunkserver): Send Master info at registration - feat: Write more blocks at once when replicating (#469) - feat(mds): Select correct FDB version at install (#470) - feat: Add new kv and fdb libs (#459) - fix(fdb): Improve exception handling in FDBContext - feat(master): Make MetadataDumper extensible (#467) - feat(master): Give own RunTab to init metadata backend (#466) - feat: Add initial scripts for FoundationDB (#332) - feat: Avoid calculate CRC twice for replications (#461) - fix: Fix CS restart while replicating (#460) - fix(main): Fix test starting master when it's not running. (#464) - feat(chunkserver): Reduce strings RAM usage (#454) - fix: Fix master reload crash (#450) - fix: Update documentation for uraft config file (#446) - feat: Readcache buffers pool (#437) - fix: Modify maxReadAheadRequests default value (#410) - feat(chunkserver): Allow reading always bigger blocks (#447) - feat!(master): Avoid overlapping scheduled deletions (#445) - feat: Show trash and reserved on path by inode - fix: Add check for safer path by inode on master - feat(chunkserver): Implement listeners for JobPool (#444) - feat: Speedup replication/rebalance (#436) - feat: Ask for bigger batches when replicating - feat: Make replication buffer thread_local - feat: Avoid saving space for unneeded parts - feat: Balance replication sources across all CSs - fix(chunkserver): Fix NetworkWorkerThread names (#442) - feat(chunkserver): Use eventfd in JobPool (#439) - feat(chunkserver): Make struct masterconn a class (#427) - feat(chunkserver): Create JobPool before connections - feat(chunkserver): Decentralize MasterConn stats - feat(chunkserver): Add own options to MasterConn - feat(chunkserver): Use shared_ptr for gJobPool - feat(chunkserver): Make struct masterconn a class - fix(uRaft): Prevent electors from starting MDS (#423) - feat!: Remove sfstools symbolic links commands (#435) - fix(master): Correct default listen host and port (#438) - feat(tools)!: Remove default timeout from some saunafs operations (#433) - feat(tools)!: Remove deprecated commands from saunafs (#385) - fix(master): Remove unavailable log spam (#424) - feat!: Remove deprecated sfscachefiles option (#420) - fix(mount): Make readdir safe on session close (#429) - fix: Remove deprecated master option MATOCU (#409) - fix: Refactor saunafs-admin command (#417) - feat(all): Unify inode numbers type (#341) - fix(mount): Use inode_t in StatfsCacheKey - fix(master): Use inode_t in GoalStatistics - fix(quotas): Use inode_t in QuotaOwner::ownerId - fix(master): Add GETINODE to restore changelogs - fix(tools): Fix print_number calls in tools - fix(mds): Fix build after rebase - fix(mds): Fix metadata save/load to file - feat(all): Add the option ENABLE_INODE64 to cmake - feat(all): Reduce magic numbers - feat(all): Add the getINode type aware function - feat(all): Increase type safety of get32bit - feat(all): Add the putINode function - feat(all): Add the PRIiNode macro - feat(ganesha): Improve wire_to_host for 64 bits inodes - feat(all): Unify inode numbers type - feat: Enhance statfs cache handling (#430) - feat: Update migration script and add documentation (#428) - fix(restore.cc): Correctly convert int to uint8_t in changelog restore (#425) - feat(admin): Add mount info list command - feat(cgi): Display mount information in monitoring - fix(chunkserver): Make masterconn a smart pointer - fix(chunkserver): Avoid direct mutex lock/unlock (#418) - feat(mount): New chunk-based write algorithm (#158) - fix: Corrected file descriptor lock release - fix: Relax constraints in malloc tests (#411) - feat(mount): Add reconnection related options (#400) - perf: Skip metadata dump during chunk registration (#406) - fix(chunkserver): Improve main network thread term (#404) - fix: Extend reach of collectGarbage - fix: Make ReadCache::Entry::timer atomic - fix: Fix possible unnecessary wait - fix: Substitute dangerous massert - fix: Fix rcvpPtr being null - fix(chunkserver): Fix locking and helgrind warns (#399) - fix(chunkserver): Enforce lock order - fix(chunkserver): Fix chunk locked for long time - fix(chunkserver): Protect status in OutputBuffer (#398) - fix(chunkserver): Improve write buffers alignment (#396) - fix(main)!: Change test output from stderr to stdout (#386) - feat(master)!: Remove deprecated functions (#388) - fix(chunkserver): Wait for GC before terminate (#390) - fix: Avoid unprotected access to chunk members - fix: Protect chunks structure in hddGetTotalSpace - fix: Fix race condition in max_wait_time - fix: Fix test_optimizing_partial_stripes - fix(tools): Fix saunafs command folder resolution (#376) - build: Set GIT_* definitions to N/A if no git info generated (#374) - fix(chunkserver): Release chunk on failing read - fix(chunkserver): Improve suppression for clang - fix(chunkserver): Remove unlock before notify - fix(clang): Fix error when prometheus is disabled (#368) - fix(main): Remove valgrind warning with clang (#365) - fix!: Fix long parallel writings - fix: chunkserver-common linking errors in GCC-13 (#358) - fix(cmake): Fix typo in jemalloc configuration (#356) * SaunaFS (4.11.0) (2025-06-06) - feat: Add migration script and documentation on migrations See saunafs-migrations.7 for more info - Add log showing an error that 5.0.0 changelogs are unsupported * SaunaFS (4.10.0) (2025-05-28) - fix(mount): Remove unnecessary waits on reads (#402) - fix: Fix client recover when master disconnects (#383) - fix(uraft): Remove floating IP on sfsmaster kill (#391) - fix: Fix replicate related chunkserver locking (#381) - fix(master): Large trash causing crash (#379) - fix: Corrected stat behavior when using quotas - fix: Correct quota per directory calculation - fix: Fix optimizing partial stripes test (#377) - feat: Disable creation of folders for full disk (#346) * SaunaFS (4.9.0) (2025-05-01) - fix(chunkserver): Fix chunkserver locking (#367) - fix: Fix truncate tests (#372) - fix: Fix masterconn_canexit() (#355) - docs: Define experimental features (#361) - fix(mount): Fix client to master response delay (#348) - fix(chunkserver): Fix long rebalancing/replicate (#351) - feat(mount): Reduce write memory usage (#343) - feat: Log error_code related message (#339) - feat: Add deprecation warning for XOR - docs: Fix incorrect documentation - feat: Add deprecation warnings for old changelog entries - feat: Add deprecation warning for sfstools script - feat: Add warning for deprecated sfscachemode - feat(tools): Add warnings for deprecated set/get commands - feat: Add deprecation warnings and documentation for -l option - fix: Add break to saunafs infinite loop on Windows (#342) - feat: Use inode quota in volume size (#336) - fix: Fix SQLite issue (#337) * SaunaFS (4.8.1) (2025-03-27) - fix: Show same stats as CGI in statfs call * SaunaFS (4.8.0) (2025-03-04) - feat(uraft): Introduce floating IP manager for HA (#301) - feat: Use quota in volume size option (#295) - feat: Statfs cache - feat: Use quota in volume size option - fix(build): Fix vcpkg presets for Windows (#305) - build: Add vcpkg support (#302) - feat(mds,common): Start decoupling metadata backend (#296) - perf(uraft): Reduce CPU usage on non-leader nodes (#297) - feat(mount): add log on OS notification area (#280) - fix: Fixes on sfsappendchunks + test (#293) - feat: Improve metadata speed for big directories (#272) - feat(chunkserver): Reduce strings RAM usage (#290) - feat(mount): Add client limit glibc malloc arenas (#274) - feat(mount): Add ignore utimens data for Windows (#283) - fix: Fix CLang compilation (#286) - build: Move cpack to another script (#285) - feat: Speedup unlink operation in big dirs (#268) - feat: Enlarge chunk hash table - feat: Reduce unlink overhead - feat: Reuse the buffers when storing metadata - feat: Make MD benchmark to show time per slice - fix(slogger): Set log level as `maybe_unused` (#278) - fix(slogger): Use level to set syslog as well - feat(slogger): Add setting up logging using env/config variables - feat(mount): Enable status updater thread option (#276) - Build saunafs using clang (#270) - fix: Addressing minor issues detected by Clang - fix: Fix functions detection in CMake (#267) - fix: Remove array-bounds and stringop-overflow warnings - fix: Fix functions detection in CMake - feat(mount): Add path by inode hidden file (#265) - feat: Reduce malloc virtual memory usage (#266) - fix(mount): Fix low level fuse options in help (#254) - fix(build): suppress warnings in manpage generation (#264) - fix: metarestore logging (#255) - fix(mount): Fix helgrind issues on `fs_nop_thread` - fix(mount): Fix consistent read cache release - Fix readcache memory release (#241) - feat(mount): Add option for open files on Windows (#230) * SaunaFS (4.7.0) (2024-12-18) - fix(mount): Remove helgrind warning - fix(mount): Reduce data race conditions in mount - fix(chunkserver): Replace pthread_mutex_t by std in jobpool (#252) - chore: Change how PACKAGE_VERSION string is build (#232) - fix(pcqueue): Remove Helgrind warnings (#250) - docs: Fix wrong default value in sfschunkserver.cfg (#246) - feat(chunkserver): Stat chunks at scan optionally (#245) - doc(master): Add man docs for caseinsensitive (#243) - feat: Improve Judy related compiler directives - fix: Unhandled exception in plugin_manager.cc - feat(mount): Add ignoreflush to tweaks variables (#228) - fix(chunkserver): Use option HDD_ADVISE_NO_CACHE (#227) - feat(chunkserver): Use aligned memory for writes (#225) - fix(tools): infinite recursion in sfstools.sh - feat(master): Add case insensitiveness on system (#188) * SaunaFS (4.6.0) (2024-10-23) - build: Add allowing to pass suffix to version - feat: Improve big sessions create/open speed - fix(mount): Enhance read cache handling and add tests (#202) - fix: Clarify error offset in file-validate (#218) - feat: Configure judy use via directives (#219) - docs(sfsgoals.cfg): Give more practical examples (#162) - feat(common): Make poll timeout configurable (#211) - feat: Improve idhash in client - feat: Improve acquired files in client - perf: Add benchmark test for many open files - feat(master): Improve openedfiles per session - feat(uraft): Add mechanism to recover floating IP (#214) - feat(chunkserver): Make configurable masterconn workers (#212) - fix(chunkserver): Avoid possible undefined behavior - feat(master): Add option to toggle data parts priority (#208) - fix(cgi): Change key to re-order list of disks (#177) - fix(chunkserver): Refactor partially csserventry - fix(mount): Fix tcptoread-write error message - feat(chunkserver): Increase NR_OF_NETWORK_WORKERS - feat(chunkserver): Improve network workers params - feat(mount): Set default cache timeout to 1000 - fix(mount): Fix many parallel reads issue - fix(mount): Fix client race conditions - feat(chunkserver): Get chunk to test from manager (#174) - feat(tests): Add RPC service recovery function (#189) * SaunaFS (4.5.1) (2024-09-16) - Fix critical issue with uraft assigning floating IP address to all nodes. Note that this fix reverts the previous fix for lost IP addresses after network restart. - test: Improve Ganesha test for master failover (#187) - feat(tests): Add RPC service recovery function (#189) * SaunaFS (4.5.0) (2024-09-05) - fix(mount): Set default cacheExpirationTime to 0 (#180) - feat(mount): Add readcachemaxsize option (#145) - feat(master): Add empty reserved files option (#176) - fix(mount): Fix random case option parsing (#135) - feat(chunkserver): Add IDiskManager::getDiskForGC (#169) - test: Improve `stop_ganesha()` function (#168) - fix(ci): Modify timeout from env (#165) - ci: Fix tests behavior (#172) - fix(uraft): Fix missing floating ip address - fix(mount): Fix create time (Windows) (#167) - feat(admin): Add list-disk-groups command (#155) - ci: Abort previous concurrent tests - ci: Update de base docker image on build - fix(tests): Fix typo in setup-machine script - fix(tests): Amend upgrade tests (#146) - fix: Update services to wait for network (#151) - fix: Update uraft service to restart on failure (#153) - fix: Release compilation on GCC 14 (#148) - feat(chunkserver): Extend IDiskManager interface (#143) - test: Verify master loading legacy metadata - feat: Load legacy metadata file - fix: Allow legacy sessions download - fix: Allow legacy metadata download * SaunaFS (4.4.0) (2024-07-31) - ci(.github): Add check for Conventional Commits (#131) - feat(metrics): Add initial prometheus support (#98) - fix(deploy): Allow to pass a file as an argument - test: Remove Ganesha test for master failover - tests: Add Ganesha test for master failover (#138) - feat(chunkserver): Extend getDiskForNewChunk (#137) - fix(build): Fix cmake syntax warning (#134) - feat(tests): Allow custom sfshdd content in tests (#132) - ci: Add prometheus dependencies - feat(master): Allow localhost connections to master - fix(mount): Fix help display format (#125) - feat(chunkserver): Relocate hddDisksReinit (#130) - feat(common): Improve the hddSizeParse function (#129) - test: Add function to stop hanging ganesha daemon (#127) - build(deps): Bump requests from 2.31.0 to 2.32.2 in /tests/dispatcher/client (#149) - ci: Delegate tests to a separate job - tidy(INSTALL.md): Remove links * SaunaFS (4.3.0) (2024-07-12) - cgi: Add png version of logo (#124) - tidy(tests): Disable test_chunk_rebalancing (#123) - fuse: Fix sfscacheperinodepercentage help (#122) - feat(chunkserver): Expose gDiskManager to plugins (#121) - fix(errors): Add explicit std string include (#119) - feat(chunkserver): Extend the PluginManager - feat(chunkserver): Add DiskManager interface * SaunaFS (4.2.0) (2024-06-19) - (all) Fix slogger dependencies compilation - (common) Split off slogger from common - (common) Split off error code from common - (master) Improve auction optimization - (master) Cache auction optimizer input/output - (master) Apply result of auction optimization - (chunkserver) Improve plugin related logs - (mount) Fix master connection checking - (mount) Fix mount when master is down - (mount) Apply fixes to DirEntryCache - (mount) Label mount threads for better debugging - (admin) Add missing option to master default config - (protocol): Add protocol documentation - (tests) Bump OS version to Ubuntu 24.04 - (tests) Update GaneshaTests suite - (tests) Fix race condition in metadata_dump_period_seconds - (tests) Add ss and pv dependencies - (tests) Fix test_cgi_validate_html test - (tests) Clean up space used by the tests - (tests) Fix LongSystemTests related to building - (tests) Migrate XOR tests to erasure coding - (tests) Improve DirEntryCache tests coverage - (tests) Remove Ganesha unneeded dependencies - (tests) Add Ganesha test for validating file corruption - (tests) Enable nfs v4.1 in Ganesha multi export test - (ci) Create NFS-Ganesha config's directory - (ci) Fix nfs-ganesha image build for latest OS * SaunaFS (4.1.1) (2024-05-22) - (docs) Add missing options in sfsmount.1 * SaunaFS (4.1.0) (2024-05-09) - (master) Improve master startup time by allowing parallel metadata loading - (mount) Add `sfsdirectio` mount option Previously you had to edit .saunafs_tweaks file. - (mount) Fix undefined behavior in client Could cause a deadlock when reconnecting after a session was lost. - (mount) Fix wrong GID being shown in .oplog - (mount) Improve DirEntryCache behaviour by caching getattr/lookup operations - (admin) Add `--help option` in saunafs-admin - (admin) Add `--defaults` option for `dump-config` in saunafs-admin - (cgi) Update saunafs-cgi. - (all) Add support for Ubuntu 24.04 - (all) Fix compilation issues on GCC 13 - (all) Various bug fixes, especially regarding tests - (windows) Support compiling common and client library - (windows) Improve behavior for Windows client * SaunaFS (4.0.1) (2024-03-01) - (docs) Fix README.md and CONTRIBUTING.md links. * SaunaFS (4.0.0) (2024-02-28) - (all) Enable C++23 - (all) Rebranding to SaunaFS - (all) XOR goal type deprecated (will be removed in a future release) - (all) Tape server support deprecated (will be removed next release) - (all) Add dependency on libyaml-cpp - (common) Create example pam.d file on build/install - (all) Remove dependency on fuse2 - (admin) Allow dumping configuration that is explicitly set - (mount) Remove FUSE2 client sfsmount is the only way to mount now and it replaces the old mfsmount3, mfsmount on the other hand has not been replaced but removed since we do not support FUSE2 anymore. - (mount) Add a multi-threaded readahead to improve single-stream reading - (mount) Add readworkers and maxreadaheadrequests command line arguments - (chunkserver) Deprecate old chunk formats (mfs and liz) and add the new SPLIT format - (chunkserver) Allow to store metadata and data chunk parts in separate directories - (chunkserver) Modify sfshdd.cfg format to allow SPLIT format - (chunkserver) Add plugin architecture for Disk implementations - (chunkserver) Refactor long files to better distribute responsibilities - (chunkserver) Add object pool to reuse OutputBuffers in read operations - (chunkserver) Add configuration option to disable CRC checking during read - (chunkserver) Remove legacy replications - (nfs-ganesha) Update nfs-ganesha plugin to support nfs-ganesha v4.3 - (nfs-ganesha) Enable NFS ACL support at compilation time - (nfs-ganesha) Refactor nfs-ganesha plugin - (nfs-ganesha) Add Doxygen documentation - (nfs-ganesha) Create GaneshaTests suite (fio, performance, copy file) * Lizardfs (3.13.0-rc1) (2018-06-28) - (all) uRaft HA - (all) fixes to EC handling - (all) nfs-ganesha plugin changed to use only C code - (mount) reduced number of secondary groups retrievals (better performance) - (mount) add fuse3 client (better performance, writeback cache) - (all) many fixes * Lizardfs (3.12.0-rc1) (2017-11-22) - (all) C API - (all) nfs-ganesha plugin - (all) RichACL support (which includes NFSv4) - (all) OSX ACL support - (master, mount) file lock fixes - (mount) client readahead enabled by default - (mount) AVX2 extensions support for erasure code goals - (chunkserver) more flexible options - (all) many fixes * Lizardfs (3.11.3) (2017-07-13) - (master) fix issues with reporting defective files - (mount) fix request size in read cache for empty results * Lizardfs (3.11.0) (2017-05-09) - (master) improve ACL implementation - (master) add option to avoid same-ip chunkserver replication - (master) add minimal goal configuration option - (master) reimplement directory entry cache for faster lookups - (master) add whole-path lookups - (master, chunkserver) add chunkserver load awareness - (mount) add readahead to improve sequential read performance - (mount) add secondary groups support - (tools) add correct-only flag to filerepair - (tools) add -s and -i options to snapshot command - (tools) add recursive remove operations (for removing large directories and snapshots) - (tools) add tool for stopping execution of tasks (snapshot, recursive remove, etc.) - (all) change to semantic versioning system - (all) many fixes * Lizardfs (3.10.4) (2016-10-07) - (master) task manager performance improvements - (master) trash fixes * Lizardfs (3.10.2) (2016-08-30) - (master) redesign in-memory representation of file system objects - at least 30% reduction in RAM usage - (master) name storage - a possibility to keep all file names in BerkeleyDB, thus saving even more RAM - (master) redesign of trash - increased performance, reduced RAM usage and CPU pressure - (master) huge boost of responsiveness - lengthy operations split into asynchronous bits - (master) OPERATIONS_DELAY* config entries, which allow postponing metadata operations on restart/disconnect - (master) fix improper handling of endangered chunks - (chunkserver) memory optimizations - at least 60% reduction in RAM usage - (chunkserver) introduce smart descriptor management - (tools) brand new `lizardfs` command, a unified replacement for mfs* tools with prompt and bash completion - (all) various fixes and community requests * Lizardfs (3.10.0-rc) (2016-03-14) - (all) Added erasure code goals - (all) Added per directory quotas - (all) Improved interaction with legacy version (chunkservers, mounts) - (all) Ports for OSX and FreeBSD - (all) Many fixes * Lizardfs (3.9.4) (2015-12-02) - (master) Removed master server overload on restarting chunkservers - (master) Improved global file locks engine - (chunkserver) Fixed leaking descriptors problem - (chunkserver) Improved mechanism of moving chunks to new directory layout - (chunkserver) Fixed issues related to scanning directories with new chunk format present - (mount) Removed hang in mount when chunkserver reported no valid copies of a file - (master) Changed handling of legacy (pre-3.9.2) chunkservers in new installations - (cgi) Added XOR replication to statistics - (all) Removed default linking to tcmalloc library due to performance drop * Lizardfs (3.9.2) (2015-10-23) - (all) Introduced XOR goal types - (all) Added file locks (flock & fcntl) - (all) Increased max number of files from 500 million to over 4 billion - (all) Introduced managing open file limits by PAM - (master) Improved consistency of applying changelogs by shadow masters - (master) Redesigned snapshot execution in master - (master) Redesigned chunk loop logic - (master) Removed hard coded connection limit - (master) Added option to limit chunk loop's CPU usage - (chunkserver) Added new network threads responsible for handling requests sent by chunkserver's clients - (chunkserver) Introduced new more efficient directory layout - (chunkserver) Added option to choose if fsync should be performed after each write for increased safety - (chunkserver) Removed hard coded connection limit - (chunkserver) Added replication network bandwidth limiting - (mount) Improved symlink cache and added configurable timeout value - (all) Minor bug fixes and improvements * Lizardfs (2.6.0) (2015-02-09) - (all) Added comments in all config files - (all) Improve messages printed by daemons when starting - (cgi) A new chunkserver's chart: number of chunk tests - (cgi) Fixed paths to static content - (cgi) New implementation of the CGI server; mfscgiserv is now deprecated. - (cgi) New table: 'Metadata Servers' in the 'Servers' tab - (chunkserver) Allowed starts with damaged disks - (chunkserver) A new option: HDD_ADVISE_NO_CACHE - (chunkserver) Improved handling of disk read errors - (chunkserver) Removed 'testing chunk: xxxxxx' log messages - (master) A new feature: disabling atime updates (globally) - (master) Added possibility to set priority on handling endangered chunks - (master) Fixed rotating changelogs and downloading files in shadow mode - (master) Fixed handling replication delay on chunkserver disconnection - (probe) New commands - (probe) Renamed to lizardfs-admin - (all) Minor bug fixes and improvements * Lizardfs (2.5.4) (2014-11-07) - (all) Boost is no longer required to build the source code of LizardFS or use the binary version - (all) Added tiering (aka 'custom goal') feature, which allows users to label chunkservers and to request chunks to be stored on specific groups of servers - (cgi) "Exports" tabs renamed to "Config", now it also shows goal definitions - (cgi) Added new tab "Chunks" - (probe) New command "chunks-health" makes it possible to get number of missing or endangered chunks - (master) Fixed reporting memory usage in CGI - (mount) Fixed caching contents of open directories - (mount) Add a .lizardfs_tweaks file - (all) Other minor fixes and improvements * Lizardfs (2.5.2) (2014-09-15) - (master, shadow) Metadata checksum mechanism, allowing to find and fix possible metadata inconsistencies between master and shadow - (mount, master) ACL cache in mount, reducing the load of the master server - (packaging) Support packaging for RedHat based systems - (master) Improved chunkserver deregistration mechanism in order to avoid temporary master unresponsiveness - (polonaise) Add filesystem API for developers allowing to use the filesystem without FUSE (and thus working also on Windows) - (all) Minor fixes and improvements * LizardFS 2.5.0 (2014-07-15) - (master) High availability provided by shadow master servers - (mount, chunkserver) CRC algorithm replaced with a 3 times faster implementation - (mount, master) Support for quotas (for users and groups) - (mount, master) Support for posix access control lists (requires additional OS support) - (mount, master) Support for global I/O limiting (bandwidth limiting) - (mount) Support for per-mountpoint I/O limiting (bandwidth limiting) - (adm) New package lizardfs-adm with a lizardfs-probe command-line tool which can be used to query the installation for various parameters - (master) New mechanism of storing metadata backup files which improves performance of the hourly metadata dumps - (all) A comprehensive test suite added - (all) Multiple bugfixes * LizardFS 1.6.28 (2013-10-16) - (all) compile with g++ by default - (deb) fix init scripts for debian packages - (all) fix build on Mac OS X - (cgi) introducing LizardFS logo * MooseFS 1.6.27 (2012-08-09) - (mfsrestore) fixed bug - freeing filenames memory too early - (all) added initial support for extra attributes (xattr), which will be introduced in upcoming version 1.7 - (master+metalogger) better change log synchronization (storage in master memory and sending expected version in metalogger - inspired by Davies Liu) - (master) acceptable difference of percent of hdd usage added to configuration (up to this version this parameter was constantly set to 0.01% - patch contributed by Davies Liu) - (master) added emergency store metadata to some other places on errors during standard hourly store (inspired by Davies Liu) - (cs) default space to be left (256MB) moved to config file (inspired by Davies Liu) - (cs) added extra limits in mfshdd.cfg (minimum space to be left, maximum space to be used) - (cs) fixed charts overflow issue (overflow in net transfer on about 575Mbps and hdd transfer on about 77MBps) - (metalogger) fixed issue: file variable was not clear after close (on rare occasions might cause segfault after disconnecting from master) - (all) cfg files moved form PREFIX/etc/ to PREFIX/etc/mfs/ - (cgiserv) improved CGI handle (added support for custom http responses, such as "302 Found") - (master+cgi) showing disconnected chunkservers in "Servers" tab. - (deb+rpm) mfscgiserv moved from mfscgi to separate package, changes in init scripts - (mount) added option 'mfsdelayedinit' - for being run from fstab/init scripts - (master) optimized goal management in chunks - (master) fixed rare race-condition on clear/preserve cache during open in mount - (mount) fixed compiling problems on Mac OS X - (all) changed code to be more compatible with new gcc 4.7 (gcc 4.7 has too strong optimizations - it can generate unpredictable code) - (master) sustain session time could be defined in mfsmaster.cfg * MooseFS 1.6.26 (2012-02-01) - (all) fixed signal handling in multithreaded modules - (master) added goal and trashtime limits to mfsexports.cfg - (metalogger) added simple check for downloaded metadata file (inspired by Davies Liu) - (master) better handle disk full (inspired by Davies Liu) - (master+metalogger) added keeping previous copies of metadata (inspired by Davies Liu) - (all) reload all settings on "reload" (SIGHUP) - (cs) disk scanning in background - (cs) fixed long termination issue (found by Davies Liu) - (master) fixed modify/open cache race * MooseFS 1.6.25 (2011-12-30) - (metadump) fixed dumping big files (>2TiB) - (metarestore) fixed bug: nonexisting changelog file caused segv - (master+mount) added 'sugidclearmode' and 'mkdircopysgid' compatibility options - (master) improved chunk deletion algorithm (soft/hard limits per server) - (all) ready for new metadata file format, which will be introduced in upcomoing version 1.7 - (all) ready for quota handling, which will be introduced in upcoming version 1.7 * MooseFS 1.6.24 (2011-12-06) - (master+mount) proxy in mount for mfstools (fixes problems with frequent connect to master) * MooseFS 1.6.23 (2011-11-08) - (master+mount) removed directory cache (didn't increase performance as expected and caused many troubles) - (metarestore) added option (-i) - ignore some structure inconsistencies - (metarestore) added option (-b) - in case of errors save the best metadata file - (mount) more dynamic write cache management (changed condition ib