MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / fsync

Method fsync

fs/extfs/extfs.cpp:1192–1203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1190 DO_EXT2FS(do_ext2fs_file_close(file))
1191 }
1192 virtual int fsync() override {
1193 if ((flags & (O_WRONLY | O_RDWR)) == 0) {
1194 errno = EBADF;
1195 return -1;
1196 }
1197 errcode_t ret = ext2fs_file_flush(file);
1198 if (ret) {
1199 errno = -parse_extfs_error(fs, ino, ret);
1200 return -1;
1201 }
1202 return flush_buffer();
1203 }
1204 virtual int fdatasync() override {
1205 return this->fsync();
1206 }

Callers 4

fdatasyncMethod · 0.95
TESTFunction · 0.45
random_content_rw_testFunction · 0.45
TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 3

TESTFunction · 0.36
random_content_rw_testFunction · 0.36
TEST_FFunction · 0.36