Loading include/client/hooks.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ int hook_statfs(const char* path, struct statfs* buf); int hook_fstatfs(unsigned int fd, struct statfs* buf); int hook_fsync(unsigned int fd); } // namespace hook } // namespace gkfs Loading src/client/hooks.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -814,5 +814,19 @@ int hook_fstatfs(unsigned int fd, struct statfs* buf) { return syscall_no_intercept(SYS_fstatfs, fd, buf); } /* The function should broadcast a flush message (pmem_persist i.e.) if the application needs the capabilities*/ int hook_fsync(unsigned int fd) { LOG(DEBUG, "{}() called with fd: {}", __func__, fd); if (CTX->file_map()->exist(fd)) { errno = 0; return 0; } return syscall_no_intercept(SYS_fsync, fd); } } // namespace hook } // namespace gkfs src/client/intercept.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -726,6 +726,10 @@ int hook(long syscall_number, reinterpret_cast<struct statfs*>(arg1)); break; case SYS_fsync: *result = gkfs::hook::hook_fsync(static_cast<unsigned int>(arg0)); break; default: // ignore any other syscalls, i.e.: pass them on to the kernel // (syscalls forwarded to the kernel that return are logged in Loading Loading
include/client/hooks.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -105,6 +105,8 @@ int hook_statfs(const char* path, struct statfs* buf); int hook_fstatfs(unsigned int fd, struct statfs* buf); int hook_fsync(unsigned int fd); } // namespace hook } // namespace gkfs Loading
src/client/hooks.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -814,5 +814,19 @@ int hook_fstatfs(unsigned int fd, struct statfs* buf) { return syscall_no_intercept(SYS_fstatfs, fd, buf); } /* The function should broadcast a flush message (pmem_persist i.e.) if the application needs the capabilities*/ int hook_fsync(unsigned int fd) { LOG(DEBUG, "{}() called with fd: {}", __func__, fd); if (CTX->file_map()->exist(fd)) { errno = 0; return 0; } return syscall_no_intercept(SYS_fsync, fd); } } // namespace hook } // namespace gkfs
src/client/intercept.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -726,6 +726,10 @@ int hook(long syscall_number, reinterpret_cast<struct statfs*>(arg1)); break; case SYS_fsync: *result = gkfs::hook::hook_fsync(static_cast<unsigned int>(arg0)); break; default: // ignore any other syscalls, i.e.: pass them on to the kernel // (syscalls forwarded to the kernel that return are logged in Loading