Loading ifs/include/preload/passthrough.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ extern void* libc_pread64; extern void* libc_lseek; extern void* libc_lseek64; extern void* libc_fsync; extern void* libc_fdatasync; extern void* libc_truncate; extern void* libc_ftruncate; Loading ifs/src/preload/intcp_functions.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ off64_t lseek64(int fd, off64_t offset, int whence) __THROW { return (reinterpret_cast<decltype(&lseek64)>(libc_lseek64))(fd, offset, whence); } int fsync(int fd) { init_passthrough_if_needed(); if (ld_is_aux_loaded() && file_map.exist(fd)) { ld_logger->trace("{}() called with fd {} path {}", __func__, fd, file_map.get(fd)->path()); return 0; // This is a noop for us atm. fsync is called implicitly because each chunk is closed after access } return (reinterpret_cast<decltype(&fsync)>(libc_fsync))(fd); } int fdatasync(int fd) { init_passthrough_if_needed(); if (ld_is_aux_loaded() && file_map.exist(fd)) { ld_logger->trace("{}() called with fd {} path {}", __func__, fd, file_map.get(fd)->path()); return 0; // This is a noop for us atm. fsync is called implicitly because each chunk is closed after access } return (reinterpret_cast<decltype(&fdatasync)>(libc_fdatasync))(fd); } int truncate(const char* path, off_t length) __THROW { init_passthrough_if_needed(); return (reinterpret_cast<decltype(&truncate)>(libc_truncate))(path, length); Loading ifs/src/preload/passthrough.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ void* libc_pread64; void* libc_lseek; void* libc_lseek64; void* libc_fsync; void* libc_fdatasync; void* libc_truncate; void* libc_ftruncate; Loading Loading @@ -101,6 +104,8 @@ void init_passthrough_() { libc_lseek = dlsym(libc, "lseek"); libc_lseek64 = dlsym(libc, "lseek64"); libc_fsync = dlsym(libc, "fsync"); libc_fdatasync = dlsym(libc, "fdatasync"); libc_truncate = dlsym(libc, "truncate"); libc_ftruncate = dlsym(libc, "ftruncate"); Loading Loading
ifs/include/preload/passthrough.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,8 @@ extern void* libc_pread64; extern void* libc_lseek; extern void* libc_lseek64; extern void* libc_fsync; extern void* libc_fdatasync; extern void* libc_truncate; extern void* libc_ftruncate; Loading
ifs/src/preload/intcp_functions.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,24 @@ off64_t lseek64(int fd, off64_t offset, int whence) __THROW { return (reinterpret_cast<decltype(&lseek64)>(libc_lseek64))(fd, offset, whence); } int fsync(int fd) { init_passthrough_if_needed(); if (ld_is_aux_loaded() && file_map.exist(fd)) { ld_logger->trace("{}() called with fd {} path {}", __func__, fd, file_map.get(fd)->path()); return 0; // This is a noop for us atm. fsync is called implicitly because each chunk is closed after access } return (reinterpret_cast<decltype(&fsync)>(libc_fsync))(fd); } int fdatasync(int fd) { init_passthrough_if_needed(); if (ld_is_aux_loaded() && file_map.exist(fd)) { ld_logger->trace("{}() called with fd {} path {}", __func__, fd, file_map.get(fd)->path()); return 0; // This is a noop for us atm. fsync is called implicitly because each chunk is closed after access } return (reinterpret_cast<decltype(&fdatasync)>(libc_fdatasync))(fd); } int truncate(const char* path, off_t length) __THROW { init_passthrough_if_needed(); return (reinterpret_cast<decltype(&truncate)>(libc_truncate))(path, length); Loading
ifs/src/preload/passthrough.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -53,6 +53,9 @@ void* libc_pread64; void* libc_lseek; void* libc_lseek64; void* libc_fsync; void* libc_fdatasync; void* libc_truncate; void* libc_ftruncate; Loading Loading @@ -101,6 +104,8 @@ void init_passthrough_() { libc_lseek = dlsym(libc, "lseek"); libc_lseek64 = dlsym(libc, "lseek64"); libc_fsync = dlsym(libc, "fsync"); libc_fdatasync = dlsym(libc, "fdatasync"); libc_truncate = dlsym(libc, "truncate"); libc_ftruncate = dlsym(libc, "ftruncate"); Loading