]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: fix _extend_log seq advance
authorPere Diaz Bou <pdiabou@redhat.com>
Fri, 29 Sep 2023 11:17:03 +0000 (13:17 +0200)
committerDavid Galloway <david.galloway@ibm.com>
Tue, 20 May 2025 16:48:58 +0000 (12:48 -0400)
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>
Fixes: https://tracker.ceph.com/issues/71199
(cherry picked from commit 0210f57a5ec8a8c0ea76a72984f39dae24986cb0)
(cherry picked from commit b76623504a544feba2adf7a196ddbd59d1b8b8f4)

src/os/bluestore/BlueFS.cc

index 1c14cd24d1d29fc5baae82373e5ddeaec47f0d60..eefdc33496799aa277f28176fda84a6572bd4b05 100644 (file)
@@ -3108,12 +3108,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++;
   }
 }