Loading src/client/cache.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ WriteSizeCache::reset(const std::string& path, bool evict) { std::pair<int, off64_t> WriteSizeCache::flush(const std::string& path, bool evict) { // mutex is set in reset(). No need to lock here auto [latest_entry_cnt, latest_entry_size] = reset(path, false); auto [latest_entry_cnt, latest_entry_size] = reset(path, evict); // no new updates in cache, don't return size if(latest_entry_cnt == 0) { return {}; Loading src/client/gkfs_functions.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1011,6 +1011,14 @@ gkfs_truncate(const std::string& path, off_t length) { return -1; } if(CTX->use_write_size_cache()) { auto err = CTX->write_size_cache()->flush(path, true).first; if(err) { LOG(ERROR, "{}() write_size_cache() failed with err '{}'", __func__, err); } } auto md = gkfs::utils::get_metadata(path, true); if(!md) { return -1; Loading tests/integration/harness/gkfs.io/write_random.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ write_random_exec(const write_random_options& opts) { io::buffer buf(data); int rv = ::write(fd, buf.data(), opts.count); ::close(fd); if(opts.verbose) { fmt::print("write(pathname=\"{}\", count={}) = {}, errno: {} [{}]\n", Loading Loading
src/client/cache.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ WriteSizeCache::reset(const std::string& path, bool evict) { std::pair<int, off64_t> WriteSizeCache::flush(const std::string& path, bool evict) { // mutex is set in reset(). No need to lock here auto [latest_entry_cnt, latest_entry_size] = reset(path, false); auto [latest_entry_cnt, latest_entry_size] = reset(path, evict); // no new updates in cache, don't return size if(latest_entry_cnt == 0) { return {}; Loading
src/client/gkfs_functions.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1011,6 +1011,14 @@ gkfs_truncate(const std::string& path, off_t length) { return -1; } if(CTX->use_write_size_cache()) { auto err = CTX->write_size_cache()->flush(path, true).first; if(err) { LOG(ERROR, "{}() write_size_cache() failed with err '{}'", __func__, err); } } auto md = gkfs::utils::get_metadata(path, true); if(!md) { return -1; Loading
tests/integration/harness/gkfs.io/write_random.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ write_random_exec(const write_random_options& opts) { io::buffer buf(data); int rv = ::write(fd, buf.data(), opts.count); ::close(fd); if(opts.verbose) { fmt::print("write(pathname=\"{}\", count={}) = {}, errno: {} [{}]\n", Loading