Actions
Bug #42091
closedbluefs: sync_metadata leaks dirty files if log_t is empty
% Done:
0%
Source:
Tags:
Backport:
mimic, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Description
When reading the source code, we found that, in the following code, if BlueFS::log_t is empty while there are BlueFS::dirty_files is not, the latter one would be leaked.
void BlueFS::sync_metadata() { std::unique_lock l(lock); if (log_t.empty()) { dout(10) << __func__ << " - no pending log events" << dendl; } else { dout(10) << __func__ << dendl; utime_t start = ceph_clock_now(); flush_bdev(); // FIXME? _flush_and_sync_log(l); dout(10) << __func__ << " done in " << (ceph_clock_now() - start) << dendl; } if (_should_compact_log()) { if (cct->_conf->bluefs_compact_log_sync) { _compact_log_sync(); } else { _compact_log_async(l); } } }
Actions