Loading CMakeLists.txt +8 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,14 @@ if (GKFS_ENABLE_CLIENT_METRICS) ) endif () ### GSL: Guidelines Support Library include_from_source(gsl MESSAGE "[${PROJECT_NAME}] Searching for GSL" SOURCE_DIR ${GKFS_DEPENDENCIES_PATH}/GSL GIT_REPOSITORY https://github.com/microsoft/GSL GIT_TAG v4.0.0 ) ################################################################################ ## Check configured variables/options and act accordingly ################################################################################ Loading src/client/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ target_link_libraries( fmt::fmt Threads::Threads Syscall_intercept::Syscall_intercept Microsoft::GSL ) # Enable MSGPack metrics for intercept only if (GKFS_ENABLE_CLIENT_METRICS) Loading @@ -116,6 +117,7 @@ target_link_libraries( hermes fmt::fmt Threads::Threads Microsoft::GSL ) install( Loading src/client/hooks.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <client/open_dir.hpp> #include <common/path_util.hpp> #include <gsl/gsl> #include <memory> Loading Loading @@ -239,7 +240,7 @@ hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos) { } /* Since kernel 2.6: pread() became pread64(), and pwrite() became * pwrite64(). */ return syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos)); } int Loading Loading @@ -293,7 +294,7 @@ hook_pwrite(unsigned int fd, const char* buf, size_t count, loff_t pos) { } /* Since kernel 2.6: pread() became pread64(), and pwrite() became * pwrite64(). */ return syscall_no_intercept_wrapper(SYS_pwrite64, fd, buf, count, pos); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_pwrite64, fd, buf, count, pos)); } int Loading Loading @@ -595,7 +596,7 @@ hook_getdents64(unsigned int fd, struct linux_dirent64* dirp, if(CTX->file_map()->exist(fd)) { return with_errno(gkfs::syscall::gkfs_getdents64(fd, dirp, count)); } return syscall_no_intercept_wrapper(SYS_getdents64, fd, dirp, count); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_getdents64, fd, dirp, count)); } Loading Loading
CMakeLists.txt +8 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,14 @@ if (GKFS_ENABLE_CLIENT_METRICS) ) endif () ### GSL: Guidelines Support Library include_from_source(gsl MESSAGE "[${PROJECT_NAME}] Searching for GSL" SOURCE_DIR ${GKFS_DEPENDENCIES_PATH}/GSL GIT_REPOSITORY https://github.com/microsoft/GSL GIT_TAG v4.0.0 ) ################################################################################ ## Check configured variables/options and act accordingly ################################################################################ Loading
src/client/CMakeLists.txt +2 −0 Original line number Diff line number Diff line Loading @@ -97,6 +97,7 @@ target_link_libraries( fmt::fmt Threads::Threads Syscall_intercept::Syscall_intercept Microsoft::GSL ) # Enable MSGPack metrics for intercept only if (GKFS_ENABLE_CLIENT_METRICS) Loading @@ -116,6 +117,7 @@ target_link_libraries( hermes fmt::fmt Threads::Threads Microsoft::GSL ) install( Loading
src/client/hooks.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include <client/open_dir.hpp> #include <common/path_util.hpp> #include <gsl/gsl> #include <memory> Loading Loading @@ -239,7 +240,7 @@ hook_pread(unsigned int fd, char* buf, size_t count, loff_t pos) { } /* Since kernel 2.6: pread() became pread64(), and pwrite() became * pwrite64(). */ return syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_pread64, fd, buf, count, pos)); } int Loading Loading @@ -293,7 +294,7 @@ hook_pwrite(unsigned int fd, const char* buf, size_t count, loff_t pos) { } /* Since kernel 2.6: pread() became pread64(), and pwrite() became * pwrite64(). */ return syscall_no_intercept_wrapper(SYS_pwrite64, fd, buf, count, pos); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_pwrite64, fd, buf, count, pos)); } int Loading Loading @@ -595,7 +596,7 @@ hook_getdents64(unsigned int fd, struct linux_dirent64* dirp, if(CTX->file_map()->exist(fd)) { return with_errno(gkfs::syscall::gkfs_getdents64(fd, dirp, count)); } return syscall_no_intercept_wrapper(SYS_getdents64, fd, dirp, count); return gsl::narrow<int>(syscall_no_intercept_wrapper(SYS_getdents64, fd, dirp, count)); } Loading