Project

General

Profile

Bug #42090

bluefs: sync_metadata leaks dirty files if log_t is empty

Added by Xuehan Xu 12 months ago. Updated 12 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

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() && dirty_files.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);
}
}
}

History

#1 Updated by Xuehan Xu 12 months ago

Sorry, this issue is editted badly. New issue: https://tracker.ceph.com/issues/42091

#2 Updated by Nathan Cutler 12 months ago

  • Status changed from New to Closed

closing in favor of #42091

Also available in: Atom PDF