]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/pg: create "submit_lock" unlocker before locking it 65616/head
authorXuehan Xu <xuxuehan@qianxin.com>
Mon, 22 Sep 2025 08:24:44 +0000 (16:24 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Mon, 22 Sep 2025 08:24:44 +0000 (16:24 +0800)
Fixes: https://tracker.ceph.com/issues/73159
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/osd/osd_operations/snaptrim_event.cc
src/crimson/osd/pg.cc

index 1a4f67dd760a42801b1181571a346d576fbca225..5128373ec85d8ea23cbc1b77df7add26f83e00df 100644 (file)
@@ -420,12 +420,12 @@ SnapTrimObjSubEvent::start()
 
   auto all_completed = interruptor::now();
   {
-    // as with PG::submit_executer, we need to build the pg log entries
-    // and submit the transaction atomically
-    co_await interruptor::make_interruptible(pg->submit_lock.lock());
     auto unlocker = seastar::defer([this] {
       pg->submit_lock.unlock();
     });
+    // as with PG::submit_executer, we need to build the pg log entries
+    // and submit the transaction atomically
+    co_await interruptor::make_interruptible(pg->submit_lock.lock());
 
     logger().debug("{}: calling remove_or_update obc={}",
                   *this, obc_manager.get_obc()->get_oid());
index c7ae18d2f252bd0785104e2918fd67625450697c..46e0c09dee866e2ab672f3bb132b239b75b794ae 100644 (file)
@@ -1064,12 +1064,12 @@ PG::interruptible_future<eversion_t> PG::submit_error_log(
   const std::error_code e,
   ceph_tid_t rep_tid)
 {
-  // as with submit_executer, need to ensure that log numbering and submission
-  // are atomic
-  co_await interruptor::make_interruptible(submit_lock.lock());
   auto unlocker = seastar::defer([this] {
     submit_lock.unlock();
   });
+  // as with submit_executer, need to ensure that log numbering and submission
+  // are atomic
+  co_await interruptor::make_interruptible(submit_lock.lock());
   LOG_PREFIX(PG::submit_error_log);
   DEBUGDPP("{} rep_tid: {} error: {}",
           *this, *m, rep_tid, e);
@@ -1202,12 +1202,12 @@ PG::submit_executer_fut PG::submit_executer(
   LOG_PREFIX(PG::submit_executer);
   DEBUGDPP("", *this);
 
-  // we need to build the pg log entries and submit the transaction
-  // atomically to ensure log ordering
-  co_await interruptor::make_interruptible(submit_lock.lock());
   auto unlocker = seastar::defer([this] {
     submit_lock.unlock();
   });
+  // we need to build the pg log entries and submit the transaction
+  // atomically to ensure log ordering
+  co_await interruptor::make_interruptible(submit_lock.lock());
 
   auto [submitted, completed] = co_await std::move(
     ox