]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/transaction_manager: don't demote dirty extents 56650/head
authorXuehan Xu <xuxuehan@qianxin.com>
Tue, 28 Jul 2026 04:42:59 +0000 (12:42 +0800)
committerXuehan Xu <xuxuehan@qianxin.com>
Fri, 31 Jul 2026 01:40:20 +0000 (09:40 +0800)
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
src/crimson/os/seastore/transaction_manager.cc

index 025a23c79004a5999f0b59fc1f4ed7669041f37f..4d0803a585989d7aaf8f501d9e1fdefd0e621817 100644 (file)
@@ -604,6 +604,11 @@ TransactionManager::relocate_shadow_extent(
     )->template cast<LogicalChildNode>();
   } else {
     extent = co_await std::move(v.get_child_fut());
+    if (extent->is_stable_dirty()) {
+      // the extent is dirty, skip it.
+      DEBUGT("skipping dirty extent: {}", t, *extent);
+      co_return LogicalChildNodeRef();
+    }
     cache->retire_extent(t, extent);
   }
   if (auto shadow = extent->get_shadow(); shadow) {
@@ -1607,6 +1612,10 @@ TransactionManager::demote_region(
     if (it.has_shadow_val()) {
       DEBUGT("demote shadow {}", t, it);
       auto extent = co_await relocate_shadow_extent(t, it);
+      if (!extent) {
+        DEBUGT("{} can't be demoted", t, it);
+        continue;
+      }
       ret.demoted_size += extent->get_length();
       auto cursor = co_await lba_manager->demote_extent(
         t, *it.direct_cursor, *extent);