Loading .gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -112,3 +112,15 @@ test path resolution: artifacts: paths: - "${LOG_PATH}" test lseek: stage: test script: - mkdir -p "${LOG_PATH}" - ${INSTALL_PATH}/bin/gkfs_daemon --mount /tmp/mountdir --root /tmp/root & - sleep 4 - LD_PRELOAD=${INSTALL_PATH}/lib/libgkfs_intercept.so ${TESTS_BUILD_PATH}/gkfs_test_lseek artifacts: paths: - "${LOG_PATH}" include/client/adafs_functions.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ int adafs_statvfs(struct statvfs* buf); int adafs_statfs(struct statfs* buf); off64_t adafs_lseek(int fd, off64_t offset, int whence); off64_t adafs_lseek(unsigned int fd, off64_t offset, unsigned int whence); off64_t adafs_lseek(std::shared_ptr<OpenFile> adafs_fd, off64_t offset, int whence); off64_t adafs_lseek(std::shared_ptr<OpenFile> adafs_fd, off64_t offset, unsigned int whence); int adafs_truncate(const std::string& path, off_t offset); Loading include/client/hooks.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ int hook_unlinkat(int dirfd, const char * cpath, int flags); int hook_symlinkat(const char * oldname, int newdfd, const char * newname); int hook_access(const char* path, int mask); int hook_faccessat(int dirfd, const char * cpath, int mode); int hook_lseek(unsigned int fd, off_t offset, unsigned int whence); off_t hook_lseek(unsigned int fd, off_t offset, unsigned int whence); int hook_truncate(const char *path, long length); int hook_ftruncate(unsigned int fd, unsigned long length); int hook_dup(unsigned int fd); Loading src/client/adafs_functions.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -251,11 +251,11 @@ int adafs_statvfs(struct statvfs* buf) { return 0; } off64_t adafs_lseek(int fd, off64_t offset, int whence) { off_t adafs_lseek(unsigned int fd, off_t offset, unsigned int whence) { return adafs_lseek(CTX->file_map()->get(fd), offset, whence); } off64_t adafs_lseek(shared_ptr<OpenFile> adafs_fd, off64_t offset, int whence) { off_t adafs_lseek(shared_ptr<OpenFile> adafs_fd, off_t offset, unsigned int whence) { switch (whence) { case SEEK_SET: CTX->log()->debug("{}() whence is SEEK_SET", __func__); Loading src/client/hooks.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ int hook_faccessat(int dirfd, const char * cpath, int mode) { } } int hook_lseek(unsigned int fd, off_t offset, unsigned int whence) { off_t hook_lseek(unsigned int fd, off_t offset, unsigned int whence) { CTX->log()->trace("{}() called with fd {}, offset {}, whence {}", __func__, fd, offset, whence); if (CTX->file_map()->exist(fd)) { auto off_ret = adafs_lseek(fd, static_cast<off64_t>(offset), whence); Loading Loading
.gitlab-ci.yml +12 −0 Original line number Diff line number Diff line Loading @@ -112,3 +112,15 @@ test path resolution: artifacts: paths: - "${LOG_PATH}" test lseek: stage: test script: - mkdir -p "${LOG_PATH}" - ${INSTALL_PATH}/bin/gkfs_daemon --mount /tmp/mountdir --root /tmp/root & - sleep 4 - LD_PRELOAD=${INSTALL_PATH}/lib/libgkfs_intercept.so ${TESTS_BUILD_PATH}/gkfs_test_lseek artifacts: paths: - "${LOG_PATH}"
include/client/adafs_functions.hpp +2 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,9 @@ int adafs_statvfs(struct statvfs* buf); int adafs_statfs(struct statfs* buf); off64_t adafs_lseek(int fd, off64_t offset, int whence); off64_t adafs_lseek(unsigned int fd, off64_t offset, unsigned int whence); off64_t adafs_lseek(std::shared_ptr<OpenFile> adafs_fd, off64_t offset, int whence); off64_t adafs_lseek(std::shared_ptr<OpenFile> adafs_fd, off64_t offset, unsigned int whence); int adafs_truncate(const std::string& path, off_t offset); Loading
include/client/hooks.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ int hook_unlinkat(int dirfd, const char * cpath, int flags); int hook_symlinkat(const char * oldname, int newdfd, const char * newname); int hook_access(const char* path, int mask); int hook_faccessat(int dirfd, const char * cpath, int mode); int hook_lseek(unsigned int fd, off_t offset, unsigned int whence); off_t hook_lseek(unsigned int fd, off_t offset, unsigned int whence); int hook_truncate(const char *path, long length); int hook_ftruncate(unsigned int fd, unsigned long length); int hook_dup(unsigned int fd); Loading
src/client/adafs_functions.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -251,11 +251,11 @@ int adafs_statvfs(struct statvfs* buf) { return 0; } off64_t adafs_lseek(int fd, off64_t offset, int whence) { off_t adafs_lseek(unsigned int fd, off_t offset, unsigned int whence) { return adafs_lseek(CTX->file_map()->get(fd), offset, whence); } off64_t adafs_lseek(shared_ptr<OpenFile> adafs_fd, off64_t offset, int whence) { off_t adafs_lseek(shared_ptr<OpenFile> adafs_fd, off_t offset, unsigned int whence) { switch (whence) { case SEEK_SET: CTX->log()->debug("{}() whence is SEEK_SET", __func__); Loading
src/client/hooks.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -280,7 +280,7 @@ int hook_faccessat(int dirfd, const char * cpath, int mode) { } } int hook_lseek(unsigned int fd, off_t offset, unsigned int whence) { off_t hook_lseek(unsigned int fd, off_t offset, unsigned int whence) { CTX->log()->trace("{}() called with fd {}, offset {}, whence {}", __func__, fd, offset, whence); if (CTX->file_map()->exist(fd)) { auto off_ret = adafs_lseek(fd, static_cast<off64_t>(offset), whence); Loading