]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/.../lba_btree_node_impl: hold reference to *this during lookup 37907/head
authorSamuel Just <sjust@redhat.com>
Fri, 30 Oct 2020 21:18:27 +0000 (14:18 -0700)
committerSamuel Just <sjust@redhat.com>
Mon, 2 Nov 2020 08:05:37 +0000 (00:05 -0800)
4f2f4f modified TransactionManager::mount() to use a weak_transaction
while calling init_cached_extents.  This is fine, but lookup() needs
to hold a reference to *this until the child lookup completes in order
to ensure residence in the lba pinning set.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/os/seastore/lba_manager/btree/lba_btree_node_impl.cc

index 47b974b5f40e0d5068bb72c6eb44bfccd59dda3f..39e197175c73ff62b8bb391190f95bf69fec7f3b 100644 (file)
@@ -46,7 +46,7 @@ LBAInternalNode::lookup_ret LBAInternalNode::lookup(
     iter->get_val(),
     get_paddr()).safe_then([c, addr, depth](auto child) {
       return child->lookup(c, addr, depth);
-    });
+    }).finally([ref=LBANodeRef(this)] {});
 }
 
 LBAInternalNode::lookup_range_ret LBAInternalNode::lookup_range(