mirror of
https://github.com/ceph/ceph
synced 2025-04-01 14:51:13 +00:00
os/bluestore: fix _extend_log seq advance
when extending the log, the sequence was left on a bad state because it would first create a transaction to update with the current seq number but leave the "real" transaction with the same sequence number which should be `extend_log_transaction.seq + 1`.
Signed-off-by: Pere Diaz Bou <pdiabou@redhat.com>
(cherry picked from commit 63f0a0df14
)
Fixes: https://tracker.ceph.com/issues/69764
This commit is contained in:
parent
e785ef2333
commit
0210f57a5e
@ -3133,12 +3133,13 @@ void BlueFS::_extend_log(uint64_t amount) {
|
||||
_pad_bl(bl, super.block_size);
|
||||
log.writer->append(bl);
|
||||
ceph_assert(allocated_before_extension >= log.writer->get_effective_write_pos());
|
||||
log.t.seq = log.seq_live;
|
||||
|
||||
// before sync_core we advance the seq
|
||||
{
|
||||
std::unique_lock<ceph::mutex> l(dirty.lock);
|
||||
_log_advance_seq();
|
||||
dirty.seq_live++;
|
||||
log.seq_live++;
|
||||
log.t.seq++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user