Repository navigation
Conversation
…irty.lock _extend_log() bumps dirty.seq_live after _flush_and_sync_log_LD() has already released dirty.lock. A file that a concurrent _signal_dirty_to_log_D() registers under the pre-bump seq_live is stranded: _consume_dirty() does an exact find(seq) and never visits that bucket, and _clear_dirty_set_stable_D() later erases it while marking the file clean. The file's op_file_update_inc never reaches the journal even though fsync() returned success; after a restart, replay reconstructs a stale fnode and RocksDB reports 'Corruption: file is too short ... to be an sstable'. Introduced by e97aa85 ("os/bluestore: fix bluefs log runway enospc"), first released in v19.0.0; Reef is unaffected. Fix by keeping all seq_live updates under dirty.lock: - split _maybe_extend_log() into _need_extend_log() and _extend_log(); - _flush_and_sync_log_LD() reserves a dedicated seq for the extension transaction atomically with its own seq advance, so no fsync can ever register a file under it; _extend_log() only steps log.t.seq; - the async-compaction site no longer extends the log itself; if the runway is short it flushes the log first, which extends it as a side effect. Fixes: https://tracker.ceph.com/issues/79068 Signed-off-by: Ming Lei <[email protected]> (cherry picked from commit 2499b4a)
_extend_log() waits out log_forbidden_to_expand after its caller has already advanced/reserved log seqs. The wait releases log.lock, so a concurrent flusher can enter and trip the log.t.seq == log.seq_live assert in _log_advance_seq(); without that assert it would flush the shared log.t under later seqs and the parked seqs would be appended out of order, which replay silently treats as end-of-log. Restore the wait-before-reservation design of 08cf6d0 ("os/bluestore/bluefs: Split single bluefs lock into multiple smaller locks"): _flush_and_sync_log_LD() composes log.t first and, only when the transaction needs to extend the log while expansion is forbidden, parks on log_cond with no seq reserved, re-evaluating from scratch on wakeup - re-consuming is safe because already-consumed files re-encode as empty deltas. _extend_log()'s wait becomes an assert: the flag is only set under log.lock, which the caller now holds from the check onward. Flushers that fit the runway never wait, so flush vs async compaction concurrency is unchanged. _flush_and_sync_log_LD() now holds log.lock through a single unique_lock: the wait uses the predicate form of condition_variable::wait(), and the early return and the post-flush release fall out of RAII instead of explicit unlock calls. Fixes: e97aa85 ("os/bluestore: fix bluefs log runway enospc") Signed-off-by: Ming Lei <[email protected]> (cherry picked from commit adf1141)
Signed-off-by: Igro Fedotov <[email protected]> (cherry picked from commit e8914db)
Signed-off-by: Igor Fedotov <[email protected]> (cherry picked from commit aa95664)
14 tasks
ming1
approved these changes
Sep 10, 2026
Contributor
|
This PR has been added to wip-bharath22-testing-20261014.084453-tentacle. |
Member
|
jenkins test api |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Parent tracker: https://tracker.ceph.com/issues/79068
Backport tracker: https://tracker.ceph.com/issues/79834
Backports: #70892
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.