@@ -88,13 +88,16 @@ inline capio_off64_t posix_directory_committed_request(const long pid,
8888 const std::filesystem::path &path,
8989 char *token_path) {
9090 START_LOG (capio_syscall (SYS_gettid), " call(path=%s)" , path.c_str ());
91+
92+ const auto resolved_path = resolve_possible_symlink (path);
93+
9194 char req[CAPIO_REQ_MAX_SIZE];
9295
93- sprintf (req, " %04d %ld %s " , CAPIO_REQUEST_POSIX_DIR_COMMITTED, pid, path .c_str ());
96+ sprintf (req, " %04d %ld %s " , CAPIO_REQUEST_POSIX_DIR_COMMITTED, pid, resolved_path .c_str ());
9497 buf_requests->write (req, CAPIO_REQ_MAX_SIZE);
95- LOG (" Sent query for directory committement " );
98+ LOG (" Sent query for directory commitment " );
9699 capio_off64_t path_len = bufs_response->at (pid)->read ();
97- LOG (" Directory %s has the token length of %llu" , path .c_str (), path_len);
100+ LOG (" Directory %s has the token length of %llu" , resolved_path .c_str (), path_len);
98101
99102 stc_queue->read (token_path, path_len);
100103 LOG (" commit token path will exist at %s" , token_path);
@@ -105,8 +108,9 @@ inline capio_off64_t posix_directory_committed_request(const long pid,
105108inline void close_request (const std::filesystem::path &path, const long tid) {
106109 START_LOG (capio_syscall (SYS_gettid), " call(path=%s, tid=%ld)" , path.c_str (), tid);
107110 write_request_cache_fs->flush (tid);
111+ const auto resolved_path = resolve_possible_symlink (path);
108112 char req[CAPIO_REQ_MAX_SIZE];
109- sprintf (req, " %04d %ld %s" , CAPIO_REQUEST_CLOSE, tid, path .c_str ());
113+ sprintf (req, " %04d %ld %s" , CAPIO_REQUEST_CLOSE, tid, resolved_path .c_str ());
110114 buf_requests->write (req, CAPIO_REQ_MAX_SIZE);
111115}
112116
@@ -131,9 +135,9 @@ inline void exit_group_request(const long tid) {
131135inline void open_request (const int fd, const std::filesystem::path &path, const long tid) {
132136 START_LOG (capio_syscall (SYS_gettid), " call(fd=%ld, path=%s, tid=%ld)" , fd, path.c_str (), tid);
133137 write_request_cache_fs->flush (tid);
134-
138+ const auto resolved_path = resolve_possible_symlink (path);
135139 char req[CAPIO_REQ_MAX_SIZE];
136- sprintf (req, " %04d %ld %d %s" , CAPIO_REQUEST_OPEN, tid, fd, path .c_str ());
140+ sprintf (req, " %04d %ld %d %s" , CAPIO_REQUEST_OPEN, tid, fd, resolved_path .c_str ());
137141 buf_requests->write (req, CAPIO_REQ_MAX_SIZE);
138142 capio_off64_t res = bufs_response->at (tid)->read ();
139143 LOG (" Obtained from server %llu" , res);
0 commit comments