diff --git a/CHANGELOG.md b/CHANGELOG.md index 87c775712cf375bbe4955ddedb979514282b3f92..d8f7143264a99531fc1704b877c2126470b85a27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - resolve_new accepts the parameter resolve_last_link,([!209](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/209)) - This solves an issue with the ci when looks at gcl-build directory (mainly lxstat) - Refactor and modernize sfind and gfind ([!226](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/226)) + - Export extra user library functions ([!227](https://storage.bsc.es/gitlab/hpc/gekkofs/-/merge_requests/227)) ### Fixed diff --git a/include/client/preload_context.hpp b/include/client/preload_context.hpp index b0662c0637e81afdc6b43fa5ff69bc3a022c1922..9f4b388758e0b26ab46abd7a05e2a36e9ba4a435 100644 --- a/include/client/preload_context.hpp +++ b/include/client/preload_context.hpp @@ -138,6 +138,7 @@ private: std::bitset protected_fds_; std::string hostname; int replicas_; + bool protect_fds_{false}; std::shared_ptr write_metrics_; diff --git a/include/client/user_functions.hpp b/include/client/user_functions.hpp index 2fd937ba7eeb5dc8e9839fdc9b3d3d14a1d353d3..7825a64c66966710ad9f0cb55723573a265bbffc 100644 --- a/include/client/user_functions.hpp +++ b/include/client/user_functions.hpp @@ -48,6 +48,7 @@ extern "C" { #include } +struct linux_dirent; struct linux_dirent64; namespace gkfs { @@ -61,6 +62,8 @@ gkfs_create(const std::string& path, mode_t mode); int gkfs_remove(const std::string& path); +int +gkfs_rmdir(const std::string& path); ssize_t gkfs_write(int fd, const void* buf, size_t count); @@ -83,11 +86,39 @@ gkfs_pread(int fd, void* buf, size_t count, off64_t offset); int gkfs_stat(const std::string& path, struct stat* buf, bool follow_links = true); +int +gkfs_statx(int dirfs, const std::string& path, int flags, unsigned int mask, + struct statx* buf, bool follow_links = true); + int gkfs_remove(const std::string& path); +int +gkfs_dup(const int oldfd); + +int +gkfs_dup2(const int oldfd, const int newfd); + +int +gkfs_access(const std::string& path, const int mask, bool follow_links); + std::vector gkfs_get_file_list(const std::string& path); + + +int +gkfs_opendir(const std::string& path); + +int +gkfs_getdents(unsigned int fd, struct linux_dirent* dirp, unsigned int count); + +int +gkfs_getdents64(unsigned int fd, struct linux_dirent64* dirp, + unsigned int count); +int +gkfs_truncate(const std::string& path, off_t offset); + + } // namespace syscall namespace malleable {