Loading CMakeLists.txt +12 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,18 @@ include_directories( ) include(GNUInstallDirs) include(CheckSymbolExists) check_cxx_source_compiles(" #include <fcntl.h> #include <sys/stat.h> int main() { struct statx buf; statx(AT_FDCWD, \"/foo\", AT_EMPTY_PATH, STATX_BASIC_STATS, &buf); return 0; } " GLIBC_HAS_STATX) # Global components add_subdirectory(src/global) Loading include/client/gkfs_functions.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -41,7 +41,9 @@ int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = tru // Implementation of statx, it uses the normal stat and maps the information to the statx structure // Follow links is true by default #ifdef STATX_TYPE int gkfs_statx(int dirfd, const std::string& path, int flags, unsigned int mask,struct statx* buf, bool follow_links = true ); #endif int gkfs_statfs(struct statfs* buf); Loading include/client/hooks.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ int hook_close(int fd); int hook_stat(const char* path, struct stat* buf); #ifdef STATX_TYPE int hook_statx(int dirfd, const char* path, int flags, unsigned int mask,struct statx* buf); #endif int hook_lstat(const char* path, struct stat* buf); Loading src/client/gkfs_functions.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ int gkfs_stat(const string& path, struct stat* buf, bool follow_links) { return 0; } #ifdef STATX_TYPE int gkfs_statx(int dirfs, const std::string& path, int flags, unsigned int mask, struct statx* buf, bool follow_links) { auto md = gkfs::util::get_metadata(path, follow_links); if (!md) { Loading Loading @@ -268,6 +268,7 @@ int gkfs_statx(int dirfs, const std::string& path, int flags, unsigned int mask, return 0; } #endif int gkfs_statfs(struct statfs* buf) { auto blk_stat = gkfs::rpc::forward_get_chunk_stat(); Loading src/client/hooks.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ int hook_stat(const char* path, struct stat* buf) { return syscall_no_intercept(SYS_stat, rel_path.c_str(), buf); } #ifdef STATX_TYPE int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct ::statx* buf) { LOG(DEBUG, "{}() called with dirfd: '{}', path: \"{}\", flags: '{}', mask: '{}', buf: '{}'", Loading Loading @@ -127,9 +127,7 @@ int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct return syscall_no_intercept(SYS_statx, dirfd, path, flags, mask, buf); } #endif int hook_lstat(const char* path, struct stat* buf) { Loading Loading
CMakeLists.txt +12 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,18 @@ include_directories( ) include(GNUInstallDirs) include(CheckSymbolExists) check_cxx_source_compiles(" #include <fcntl.h> #include <sys/stat.h> int main() { struct statx buf; statx(AT_FDCWD, \"/foo\", AT_EMPTY_PATH, STATX_BASIC_STATS, &buf); return 0; } " GLIBC_HAS_STATX) # Global components add_subdirectory(src/global) Loading
include/client/gkfs_functions.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -41,7 +41,9 @@ int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = tru // Implementation of statx, it uses the normal stat and maps the information to the statx structure // Follow links is true by default #ifdef STATX_TYPE int gkfs_statx(int dirfd, const std::string& path, int flags, unsigned int mask,struct statx* buf, bool follow_links = true ); #endif int gkfs_statfs(struct statfs* buf); Loading
include/client/hooks.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -30,7 +30,9 @@ int hook_close(int fd); int hook_stat(const char* path, struct stat* buf); #ifdef STATX_TYPE int hook_statx(int dirfd, const char* path, int flags, unsigned int mask,struct statx* buf); #endif int hook_lstat(const char* path, struct stat* buf); Loading
src/client/gkfs_functions.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ int gkfs_stat(const string& path, struct stat* buf, bool follow_links) { return 0; } #ifdef STATX_TYPE int gkfs_statx(int dirfs, const std::string& path, int flags, unsigned int mask, struct statx* buf, bool follow_links) { auto md = gkfs::util::get_metadata(path, follow_links); if (!md) { Loading Loading @@ -268,6 +268,7 @@ int gkfs_statx(int dirfs, const std::string& path, int flags, unsigned int mask, return 0; } #endif int gkfs_statfs(struct statfs* buf) { auto blk_stat = gkfs::rpc::forward_get_chunk_stat(); Loading
src/client/hooks.cpp +2 −4 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ int hook_stat(const char* path, struct stat* buf) { return syscall_no_intercept(SYS_stat, rel_path.c_str(), buf); } #ifdef STATX_TYPE int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct ::statx* buf) { LOG(DEBUG, "{}() called with dirfd: '{}', path: \"{}\", flags: '{}', mask: '{}', buf: '{}'", Loading Loading @@ -127,9 +127,7 @@ int hook_statx(int dirfd, const char* path, int flags, unsigned int mask, struct return syscall_no_intercept(SYS_statx, dirfd, path, flags, mask, buf); } #endif int hook_lstat(const char* path, struct stat* buf) { Loading