From a895ba66b942c5c730b1240d141da87e2c133dbf Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Sat, 22 Jan 2022 23:01:01 +0900 Subject: [PATCH] Experiment with FUSE 3 This increases the maximum write size from 128 KB to 1 MB and supports some interesting FUSE_READDIR_PLUS flags. Remove stale FUSE_CAP_BIG_WRITES and flag_utime_omit_ok options. References #1159. --- .github/workflows/linux-ci-helper.sh | 24 ++++++------- configure.ac | 12 +++---- src/fdcache_entity.cpp | 2 ++ src/s3fs.cpp | 53 +++++++++++++--------------- src/s3fs.h | 2 +- src/syncfiller.cpp | 4 +-- test/integration-test-common.sh | 2 +- 7 files changed, 48 insertions(+), 51 deletions(-) diff --git a/.github/workflows/linux-ci-helper.sh b/.github/workflows/linux-ci-helper.sh index 1034877..86c89c5 100755 --- a/.github/workflows/linux-ci-helper.sh +++ b/.github/workflows/linux-ci-helper.sh @@ -87,7 +87,7 @@ if [ "${CONTAINER_FULLNAME}" = "ubuntu:24.10" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-21-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mailcap libtool pkg-config libssl-dev attr curl python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-21-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mailcap libtool pkg-config libssl-dev attr curl python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -96,7 +96,7 @@ elif [ "${CONTAINER_FULLNAME}" = "ubuntu:24.04" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-21-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mailcap libtool pkg-config libssl-dev attr curl python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-21-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mailcap libtool pkg-config libssl-dev attr curl python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -105,7 +105,7 @@ elif [ "${CONTAINER_FULLNAME}" = "ubuntu:22.04" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-17-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-17-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -114,7 +114,7 @@ elif [ "${CONTAINER_FULLNAME}" = "ubuntu:20.04" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev openjdk-17-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev openjdk-17-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -123,7 +123,7 @@ elif [ "${CONTAINER_FULLNAME}" = "debian:bookworm" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-17-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl procps python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev clang-tidy openjdk-17-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl procps python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -132,7 +132,7 @@ elif [ "${CONTAINER_FULLNAME}" = "debian:bullseye" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="autoconf autotools-dev openjdk-17-jre-headless fuse jq libfuse-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl procps python3-pip unzip" + INSTALL_PACKAGES="autoconf autotools-dev openjdk-17-jre-headless fuse3 jq libfuse3-dev libcurl4-openssl-dev libxml2-dev locales-all mime-support libtool pkg-config libssl-dev attr curl procps python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -148,7 +148,7 @@ elif [ "${CONTAINER_FULLNAME}" = "rockylinux:9" ]; then # PACKAGE_INSTALL_ADDITIONAL_OPTIONS="--allowerasing" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 procps unzip xz https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse3 fuse3-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 procps unzip xz https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm" INSTALL_CHECKER_PKGS="cppcheck" INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=epel" @@ -162,7 +162,7 @@ elif [ "${CONTAINER_FULLNAME}" = "rockylinux:8" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 unzip" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse3 fuse3-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-17-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel attr diffutils curl python3 unzip" INSTALL_CHECKER_PKGS="cppcheck" INSTALL_CHECKER_PKG_OPTIONS="--enablerepo=powertools" @@ -176,7 +176,7 @@ elif [ "${CONTAINER_FULLNAME}" = "fedora:41" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip libcxx libcxx-devel" + INSTALL_PACKAGES="clang clang-tools-extra curl-devel fuse3 fuse3-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip libcxx libcxx-devel" INSTALL_CHECKER_PKGS="cppcheck ShellCheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -185,7 +185,7 @@ elif [ "${CONTAINER_FULLNAME}" = "fedora:40" ]; then PACKAGE_UPDATE_OPTIONS="update -y -qq" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="clang-tools-extra curl-devel fuse fuse-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip" + INSTALL_PACKAGES="clang-tools-extra curl-devel fuse3 fuse3-devel gcc libstdc++-devel gcc-c++ glibc-langpack-en java-latest-openjdk-headless jq libxml2-devel mailcap git automake make openssl openssl-devel curl attr diffutils procps python3-pip unzip" INSTALL_CHECKER_PKGS="cppcheck ShellCheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -194,7 +194,7 @@ elif [ "${CONTAINER_FULLNAME}" = "opensuse/leap:15" ]; then PACKAGE_UPDATE_OPTIONS="refresh" PACKAGE_INSTALL_OPTIONS="install -y" - INSTALL_PACKAGES="automake clang-tools curl-devel fuse fuse-devel gcc-c++ java-17-openjdk-headless jq libxml2-devel make openssl openssl-devel python3-pip curl attr ShellCheck procps unzip" + INSTALL_PACKAGES="automake clang-tools curl-devel fuse3 fuse3-devel gcc-c++ java-17-openjdk-headless jq libxml2-devel make openssl openssl-devel python3-pip curl attr ShellCheck procps unzip" INSTALL_CHECKER_PKGS="cppcheck ShellCheck" INSTALL_CHECKER_PKG_OPTIONS="" @@ -203,7 +203,7 @@ elif [ "${CONTAINER_FULLNAME}" = "alpine:3.20" ]; then PACKAGE_UPDATE_OPTIONS="update --no-progress" PACKAGE_INSTALL_OPTIONS="add --no-progress --no-cache" - INSTALL_PACKAGES="bash clang-extra-tools curl g++ make automake autoconf libtool git curl-dev fuse-dev jq libxml2-dev openssl coreutils procps attr sed mailcap openjdk17 aws-cli" + INSTALL_PACKAGES="bash clang-extra-tools curl g++ make automake autoconf libtool git curl-dev fuse3 fuse3-dev jq libxml2-dev openssl coreutils procps attr sed mailcap openjdk17 aws-cli" INSTALL_CHECKER_PKGS="cppcheck shellcheck" INSTALL_CHECKER_PKG_OPTIONS="" diff --git a/configure.ac b/configure.ac index 68637fb..c1b16e5 100644 --- a/configure.ac +++ b/configure.ac @@ -53,7 +53,7 @@ case "$target" in *) # Default Case # assume other supported linux system - min_fuse_version=2.8.4 + min_fuse_version=3.0.0 ;; esac @@ -67,7 +67,7 @@ PKG_CHECK_MODULES([FUSE_T], [fuse-t >= ${min_fuse_t_version}], [found_fuse_t=yes AS_IF([test "$found_fuse_t" = "yes"], [PKG_CHECK_MODULES([fuse_library_checking], [fuse-t >= ${min_fuse_t_version}])], - [PKG_CHECK_MODULES([fuse_library_checking], [fuse >= ${min_fuse_version}])]) + [PKG_CHECK_MODULES([fuse_library_checking], [fuse3 >= ${min_fuse_version}])]) dnl ---------------------------------------------- dnl Choice SSL library @@ -202,7 +202,7 @@ openssl) AC_MSG_RESULT(OpenSSL) AS_IF([test "$found_fuse_t" = "yes"], [PKG_CHECK_MODULES([DEPS], [fuse-t >= ${min_fuse_t_version} libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9 ])], - [PKG_CHECK_MODULES([DEPS], [fuse >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9 ])]) + [PKG_CHECK_MODULES([DEPS], [fuse3 >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 libcrypto >= 0.9 ])]) AC_MSG_CHECKING([openssl 3.0 or later]) AC_COMPILE_IFELSE( @@ -222,7 +222,7 @@ gnutls) [ AS_IF([test "$found_fuse_t" = "yes"], [PKG_CHECK_MODULES([DEPS], [fuse-t >= ${min_fuse_t_version} libcurl >= 7.0 libxml-2.0 >= 2.6 gnutls >= 2.12.0 ])], - [PKG_CHECK_MODULES([DEPS], [fuse >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 gnutls >= 2.12.0 ])]) + [PKG_CHECK_MODULES([DEPS], [fuse3 >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 gnutls >= 2.12.0 ])]) LIBS="-lgnutls -lgcrypt $LIBS" AC_MSG_CHECKING([gnutls is build with]) AC_MSG_RESULT(gcrypt) @@ -238,7 +238,7 @@ nettle) [ AS_IF([test "$found_fuse_t" = "yes"], [PKG_CHECK_MODULES([DEPS], [fuse-t >= ${min_fuse_t_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nettle >= 2.7.1 ])], - [PKG_CHECK_MODULES([DEPS], [fuse >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nettle >= 2.7.1 ])]) + [PKG_CHECK_MODULES([DEPS], [fuse3 >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nettle >= 2.7.1 ])]) LIBS="-lgnutls -lnettle $LIBS" AC_MSG_CHECKING([gnutls is build with]) AC_MSG_RESULT(nettle) @@ -249,7 +249,7 @@ nss) AC_MSG_RESULT(NSS) AS_IF([test "$found_fuse_t" = "yes"], [PKG_CHECK_MODULES([DEPS], [fuse-t >= ${min_fuse_t_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nss >= 3.15.0 ])], - [PKG_CHECK_MODULES([DEPS], [fuse >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nss >= 3.15.0 ])]) + [PKG_CHECK_MODULES([DEPS], [fuse3 >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 nss >= 3.15.0 ])]) ;; *) AC_MSG_ERROR([unknown ssl library type.]) diff --git a/src/fdcache_entity.cpp b/src/fdcache_entity.cpp index 811396a..85944dc 100644 --- a/src/fdcache_entity.cpp +++ b/src/fdcache_entity.cpp @@ -27,8 +27,10 @@ #include #include #include +#include #include #include +#include #include "common.h" #include "s3fs.h" diff --git a/src/s3fs.cpp b/src/s3fs.cpp index b1f2e3f..4587b84 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -152,22 +152,22 @@ static int print_umount_message(const std::string& mp, bool force) __attribute__ //------------------------------------------------------------------- // fuse interface functions //------------------------------------------------------------------- -static int s3fs_getattr(const char* path, struct stat* stbuf); +static int s3fs_getattr(const char* path, struct stat* stbuf, fuse_file_info* info); static int s3fs_readlink(const char* path, char* buf, size_t size); static int s3fs_mknod(const char* path, mode_t mode, dev_t rdev); static int s3fs_mkdir(const char* path, mode_t mode); static int s3fs_unlink(const char* path); static int s3fs_rmdir(const char* path); static int s3fs_symlink(const char* from, const char* to); -static int s3fs_rename(const char* from, const char* to); +static int s3fs_rename(const char* from, const char* to, unsigned int flags); static int s3fs_link(const char* from, const char* to); -static int s3fs_chmod(const char* path, mode_t mode); -static int s3fs_chmod_nocopy(const char* path, mode_t mode); -static int s3fs_chown(const char* path, uid_t uid, gid_t gid); -static int s3fs_chown_nocopy(const char* path, uid_t uid, gid_t gid); -static int s3fs_utimens(const char* path, const struct timespec ts[2]); -static int s3fs_utimens_nocopy(const char* path, const struct timespec ts[2]); -static int s3fs_truncate(const char* path, off_t size); +static int s3fs_chmod(const char* path, mode_t mode, struct fuse_file_info* info); +static int s3fs_chmod_nocopy(const char* path, mode_t mode, struct fuse_file_info* info); +static int s3fs_chown(const char* path, uid_t uid, gid_t gid, struct fuse_file_info* info); +static int s3fs_chown_nocopy(const char* path, uid_t uid, gid_t gid, struct fuse_file_info* info); +static int s3fs_utimens(const char* path, const struct timespec ts[2], struct fuse_file_info* info); +static int s3fs_utimens_nocopy(const char* path, const struct timespec ts[2], struct fuse_file_info* info); +static int s3fs_truncate(const char* path, off_t size, struct fuse_file_info* info); static int s3fs_create(const char* path, mode_t mode, struct fuse_file_info* fi); static int s3fs_open(const char* path, struct fuse_file_info* fi); static int s3fs_read(const char* path, char* buf, size_t size, off_t offset, struct fuse_file_info* fi); @@ -177,9 +177,9 @@ static int s3fs_flush(const char* path, struct fuse_file_info* fi); static int s3fs_fsync(const char* path, int datasync, struct fuse_file_info* fi); static int s3fs_release(const char* path, struct fuse_file_info* fi); static int s3fs_opendir(const char* path, struct fuse_file_info* fi); -static int s3fs_readdir(const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* fi); +static int s3fs_readdir(const char* path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* info, enum fuse_readdir_flags); static int s3fs_access(const char* path, int mask); -static void* s3fs_init(struct fuse_conn_info* conn); +static void* s3fs_init(struct fuse_conn_info* conn, fuse_config* config); static void s3fs_destroy(void*); #if defined(__APPLE__) static int s3fs_setxattr(const char* path, const char* name, const char* value, size_t size, int flags, uint32_t position); @@ -883,7 +883,7 @@ int put_headers(const char* path, const headers_t& meta, bool is_copy, bool use_ return 0; } -static int s3fs_getattr(const char* _path, struct stat* stbuf) +static int s3fs_getattr(const char* _path, struct stat* stbuf, fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -1738,7 +1738,7 @@ static int rename_directory(const char* from, const char* to) return 0; } -static int s3fs_rename(const char* _from, const char* _to) +static int s3fs_rename(const char* _from, const char* _to, unsigned int flags) { WTF8_ENCODE(from) WTF8_ENCODE(to) @@ -1811,7 +1811,7 @@ static int s3fs_link(const char* _from, const char* _to) return -ENOTSUP; } -static int s3fs_chmod(const char* _path, mode_t mode) +static int s3fs_chmod(const char* _path, mode_t mode, struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -1927,7 +1927,7 @@ static int s3fs_chmod(const char* _path, mode_t mode) return 0; } -static int s3fs_chmod_nocopy(const char* _path, mode_t mode) +static int s3fs_chmod_nocopy(const char* _path, mode_t mode, struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -2019,7 +2019,7 @@ static int s3fs_chmod_nocopy(const char* _path, mode_t mode) return result; } -static int s3fs_chown(const char* _path, uid_t uid, gid_t gid) +static int s3fs_chown(const char* _path, uid_t uid, gid_t gid, struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -2142,7 +2142,7 @@ static int s3fs_chown(const char* _path, uid_t uid, gid_t gid) return 0; } -static int s3fs_chown_nocopy(const char* _path, uid_t uid, gid_t gid) +static int s3fs_chown_nocopy(const char* _path, uid_t uid, gid_t gid, struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -2354,7 +2354,7 @@ static int update_mctime_parent_directory(const char* _path) return 0; } -static int s3fs_utimens(const char* _path, const struct timespec ts[2]) +static int s3fs_utimens(const char* _path, const struct timespec ts[2], struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -2501,7 +2501,7 @@ static int s3fs_utimens(const char* _path, const struct timespec ts[2]) return 0; } -static int s3fs_utimens_nocopy(const char* _path, const struct timespec ts[2]) +static int s3fs_utimens_nocopy(const char* _path, const struct timespec ts[2], struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -2607,7 +2607,7 @@ static int s3fs_utimens_nocopy(const char* _path, const struct timespec ts[2]) return result; } -static int s3fs_truncate(const char* _path, off_t size) +static int s3fs_truncate(const char* _path, off_t size, struct fuse_file_info* info) { WTF8_ENCODE(path) int result; @@ -3182,7 +3182,7 @@ static int readdir_multi_head(const char* path, const S3ObjList& head, void* buf return 0; } -static int s3fs_readdir(const char* _path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* fi) +static int s3fs_readdir(const char* _path, void* buf, fuse_fill_dir_t filler, off_t offset, struct fuse_file_info* info, enum fuse_readdir_flags) { WTF8_ENCODE(path) S3ObjList head; @@ -3201,8 +3201,8 @@ static int s3fs_readdir(const char* _path, void* buf, fuse_fill_dir_t filler, of } // force to add "." and ".." name. - filler(buf, ".", nullptr, 0); - filler(buf, "..", nullptr, 0); + filler(buf, ".", nullptr, 0, static_cast(0)); + filler(buf, "..", nullptr, 0, static_cast(0)); if(head.IsEmpty()){ return 0; } @@ -4034,7 +4034,7 @@ static void s3fs_exit_fuseloop(int exit_status) } } -static void* s3fs_init(struct fuse_conn_info* conn) +static void* s3fs_init(struct fuse_conn_info* conn, fuse_config* config) { S3FS_PRN_INIT_INFO("init v%s%s with %s, credential-library(%s)", VERSION, COMMIT_HASH_VAL, s3fs_crypt_lib_name(), ps3fscred->GetCredFuncVersion(false)); @@ -4071,10 +4071,6 @@ static void* s3fs_init(struct fuse_conn_info* conn) } #endif - if(conn->capable & FUSE_CAP_BIG_WRITES){ - conn->want |= FUSE_CAP_BIG_WRITES; - } - // Signal object if(!S3fsSignals::Initialize()){ S3FS_PRN_ERR("Failed to initialize signal object, but continue..."); @@ -5657,7 +5653,6 @@ int main(int argc, char* argv[]) s3fs_oper.listxattr = s3fs_listxattr; s3fs_oper.removexattr = s3fs_removexattr; } - s3fs_oper.flag_utime_omit_ok = true; // now passing things off to fuse, fuse will finish evaluating the command line args fuse_res = fuse_main(custom_args.argc, custom_args.argv, &s3fs_oper, nullptr); diff --git a/src/s3fs.h b/src/s3fs.h index 83f54a2..a21606e 100644 --- a/src/s3fs.h +++ b/src/s3fs.h @@ -21,7 +21,7 @@ #ifndef S3FS_S3FS_H_ #define S3FS_S3FS_H_ -#define FUSE_USE_VERSION 26 +#define FUSE_USE_VERSION 30 #include diff --git a/src/syncfiller.cpp b/src/syncfiller.cpp index 01e62cb..0ab4a9b 100644 --- a/src/syncfiller.cpp +++ b/src/syncfiller.cpp @@ -44,7 +44,7 @@ int SyncFiller::Fill(const std::string& name, const struct stat *stbuf, off_t of int result = 0; if(filled.insert(name).second){ - result = filler_func(filler_buff, name.c_str(), stbuf, off); + result = filler_func(filler_buff, name.c_str(), stbuf, off, static_cast(0)); } return result; } @@ -56,7 +56,7 @@ int SyncFiller::SufficiencyFill(const std::vector& pathlist) int result = 0; for(auto it = pathlist.cbegin(); it != pathlist.cend(); ++it) { if(filled.insert(*it).second){ - if(0 != filler_func(filler_buff, it->c_str(), nullptr, 0)){ + if(0 != filler_func(filler_buff, it->c_str(), nullptr, 0, static_cast(0))){ result = 1; } } diff --git a/test/integration-test-common.sh b/test/integration-test-common.sh index 2a561fe..0574dd3 100644 --- a/test/integration-test-common.sh +++ b/test/integration-test-common.sh @@ -360,7 +360,7 @@ function stop_s3fs { fi else if grep -q "${TEST_BUCKET_MOUNT_POINT_1}" /proc/mounts; then - retry 10 grep -q "${TEST_BUCKET_MOUNT_POINT_1}" /proc/mounts "&&" fusermount -u "${TEST_BUCKET_MOUNT_POINT_1}" + retry 10 grep -q "${TEST_BUCKET_MOUNT_POINT_1}" /proc/mounts "&&" fusermount3 -u "${TEST_BUCKET_MOUNT_POINT_1}" fi fi }