Loading CHANGELOG.md +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Intercept I/O syscalls instead of GlibC function using [syscall intercept library](https://github.com/pmem/syscall_intercept) ## [0.4.0] - 2019-04-18 First GekkoFS pubblic release First GekkoFS public release This version provides a client library that uses GLibC I/O function interception. Loading include/client/gkfs_functions.hpp 0 → 100644 +87 −0 Original line number Diff line number Diff line /* Copyright 2018-2019, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2019, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_GKFS_FUNCTIONS_HPP #define GEKKOFS_GKFS_FUNCTIONS_HPP #include <client/open_file_map.hpp> #include <global/metadata.hpp> std::shared_ptr<Metadata> gkfs_metadata(const std::string& path, bool follow_links = false); int gkfs_open(const std::string& path, mode_t mode, int flags); int gkfs_mk_node(const std::string& path, mode_t mode); int gkfs_rm_node(const std::string& path); int gkfs_access(const std::string& path, int mask, bool follow_links = true); int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = true); int gkfs_statvfs(struct statvfs* buf); int gkfs_statfs(struct statfs* buf); off64_t gkfs_lseek(unsigned int fd, off64_t offset, unsigned int whence); off64_t gkfs_lseek(std::shared_ptr<OpenFile> gkfs_fd, off64_t offset, unsigned int whence); int gkfs_truncate(const std::string& path, off_t offset); int gkfs_truncate(const std::string& path, off_t old_size, off_t new_size); int gkfs_dup(int oldfd); int gkfs_dup2(int oldfd, int newfd); #ifdef HAS_SYMLINKS int gkfs_mk_symlink(const std::string& path, const std::string& target_path); int gkfs_readlink(const std::string& path, char* buf, int bufsize); #endif ssize_t gkfs_pwrite(std::shared_ptr<OpenFile> file, const char* buf, size_t count, off64_t offset); ssize_t gkfs_pwrite_ws(int fd, const void* buf, size_t count, off64_t offset); ssize_t gkfs_write(int fd, const void* buf, size_t count); ssize_t gkfs_pwritev(int fd, const struct iovec* iov, int iovcnt, off_t offset); ssize_t gkfs_writev(int fd, const struct iovec* iov, int iovcnt); ssize_t gkfs_pread(std::shared_ptr<OpenFile> file, char* buf, size_t count, off64_t offset); ssize_t gkfs_pread_ws(int fd, void* buf, size_t count, off64_t offset); ssize_t gkfs_read(int fd, void* buf, size_t count); int gkfs_opendir(const std::string& path); int getdents(unsigned int fd, struct linux_dirent* dirp, unsigned int count); int getdents64(unsigned int fd, struct linux_dirent64* dirp, unsigned int count); int gkfs_rmdir(const std::string& path); #endif //GEKKOFS_GKFS_FUNCTIONS_HPP include/client/hooks.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_HOOKS_HPP #define IFS_HOOKS_HPP #ifndef GEKKOFS_HOOKS_HPP #define GEKKOFS_HOOKS_HPP #include <sys/types.h> #include <fcntl.h> Loading @@ -20,9 +20,13 @@ int hook_openat(int dirfd, const char *cpath, int flags, mode_t mode); int hook_close(int fd); int hook_stat(const char* path, struct stat* buf); int hook_lstat(const char* path, struct stat* buf); int hook_fstat(unsigned int fd, struct stat* buf); int hook_fstatat(int dirfd, const char* cpath, struct stat* buf, int flags); int hook_read(unsigned int fd, void* buf, size_t count); int hook_pread(unsigned int fd, char * buf, size_t count, loff_t pos); Loading include/client/intcp_functions.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_INTCP_FUNCTIONS_HPP #define IFS_INTCP_FUNCTIONS_HPP #ifndef GEKKOFS_INTCP_FUNCTIONS_HPP #define GEKKOFS_INTCP_FUNCTIONS_HPP #include <dirent.h> Loading Loading @@ -75,6 +75,6 @@ strong_alias(intcp_statvfs, statvfs) int intcp_fstatvfs(int fd, struct statvfs *buf) noexcept; strong_alias(intcp_fstatvfs, fstatvfs) #endif // IFS_INTCP_FUNCTIONS_HPP #endif // GEKKOFS_INTCP_FUNCTIONS_HPP } // extern C include/client/intercept.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_INTERCEPT_HPP #define IFS_INTERCEPT_HPP #ifndef GEKKOFS_INTERCEPT_HPP #define GEKKOFS_INTERCEPT_HPP int internal_hook_guard_wrapper(long syscall_number, Loading Loading
CHANGELOG.md +1 −1 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Intercept I/O syscalls instead of GlibC function using [syscall intercept library](https://github.com/pmem/syscall_intercept) ## [0.4.0] - 2019-04-18 First GekkoFS pubblic release First GekkoFS public release This version provides a client library that uses GLibC I/O function interception. Loading
include/client/gkfs_functions.hpp 0 → 100644 +87 −0 Original line number Diff line number Diff line /* Copyright 2018-2019, Barcelona Supercomputing Center (BSC), Spain Copyright 2015-2019, Johannes Gutenberg Universitaet Mainz, Germany This software was partially supported by the EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu). This software was partially supported by the ADA-FS project under the SPPEXA project funded by the DFG. SPDX-License-Identifier: MIT */ #ifndef GEKKOFS_GKFS_FUNCTIONS_HPP #define GEKKOFS_GKFS_FUNCTIONS_HPP #include <client/open_file_map.hpp> #include <global/metadata.hpp> std::shared_ptr<Metadata> gkfs_metadata(const std::string& path, bool follow_links = false); int gkfs_open(const std::string& path, mode_t mode, int flags); int gkfs_mk_node(const std::string& path, mode_t mode); int gkfs_rm_node(const std::string& path); int gkfs_access(const std::string& path, int mask, bool follow_links = true); int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = true); int gkfs_statvfs(struct statvfs* buf); int gkfs_statfs(struct statfs* buf); off64_t gkfs_lseek(unsigned int fd, off64_t offset, unsigned int whence); off64_t gkfs_lseek(std::shared_ptr<OpenFile> gkfs_fd, off64_t offset, unsigned int whence); int gkfs_truncate(const std::string& path, off_t offset); int gkfs_truncate(const std::string& path, off_t old_size, off_t new_size); int gkfs_dup(int oldfd); int gkfs_dup2(int oldfd, int newfd); #ifdef HAS_SYMLINKS int gkfs_mk_symlink(const std::string& path, const std::string& target_path); int gkfs_readlink(const std::string& path, char* buf, int bufsize); #endif ssize_t gkfs_pwrite(std::shared_ptr<OpenFile> file, const char* buf, size_t count, off64_t offset); ssize_t gkfs_pwrite_ws(int fd, const void* buf, size_t count, off64_t offset); ssize_t gkfs_write(int fd, const void* buf, size_t count); ssize_t gkfs_pwritev(int fd, const struct iovec* iov, int iovcnt, off_t offset); ssize_t gkfs_writev(int fd, const struct iovec* iov, int iovcnt); ssize_t gkfs_pread(std::shared_ptr<OpenFile> file, char* buf, size_t count, off64_t offset); ssize_t gkfs_pread_ws(int fd, void* buf, size_t count, off64_t offset); ssize_t gkfs_read(int fd, void* buf, size_t count); int gkfs_opendir(const std::string& path); int getdents(unsigned int fd, struct linux_dirent* dirp, unsigned int count); int getdents64(unsigned int fd, struct linux_dirent64* dirp, unsigned int count); int gkfs_rmdir(const std::string& path); #endif //GEKKOFS_GKFS_FUNCTIONS_HPP
include/client/hooks.hpp +7 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_HOOKS_HPP #define IFS_HOOKS_HPP #ifndef GEKKOFS_HOOKS_HPP #define GEKKOFS_HOOKS_HPP #include <sys/types.h> #include <fcntl.h> Loading @@ -20,9 +20,13 @@ int hook_openat(int dirfd, const char *cpath, int flags, mode_t mode); int hook_close(int fd); int hook_stat(const char* path, struct stat* buf); int hook_lstat(const char* path, struct stat* buf); int hook_fstat(unsigned int fd, struct stat* buf); int hook_fstatat(int dirfd, const char* cpath, struct stat* buf, int flags); int hook_read(unsigned int fd, void* buf, size_t count); int hook_pread(unsigned int fd, char * buf, size_t count, loff_t pos); Loading
include/client/intcp_functions.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_INTCP_FUNCTIONS_HPP #define IFS_INTCP_FUNCTIONS_HPP #ifndef GEKKOFS_INTCP_FUNCTIONS_HPP #define GEKKOFS_INTCP_FUNCTIONS_HPP #include <dirent.h> Loading Loading @@ -75,6 +75,6 @@ strong_alias(intcp_statvfs, statvfs) int intcp_fstatvfs(int fd, struct statvfs *buf) noexcept; strong_alias(intcp_fstatvfs, fstatvfs) #endif // IFS_INTCP_FUNCTIONS_HPP #endif // GEKKOFS_INTCP_FUNCTIONS_HPP } // extern C
include/client/intercept.hpp +3 −3 Original line number Diff line number Diff line Loading @@ -11,8 +11,8 @@ SPDX-License-Identifier: MIT */ #ifndef IFS_INTERCEPT_HPP #define IFS_INTERCEPT_HPP #ifndef GEKKOFS_INTERCEPT_HPP #define GEKKOFS_INTERCEPT_HPP int internal_hook_guard_wrapper(long syscall_number, Loading