Skip to content

Commit 8d30cff

Browse files
committed
crimson/os/seastore/lba_manager: consider mutation pending extents when
asserting the validity of their parents Signed-off-by: Xuehan Xu <[email protected]>
1 parent e3b91ff commit 8d30cff

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/crimson/os/seastore/lba/btree_lba_manager.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,15 @@ BtreeLBAManager::get_mapping(
288288
{
289289
LOG_PREFIX(BtreeLBAManager::get_mapping);
290290
TRACET("{}", t, extent);
291-
assert(extent.peek_parent_node()->is_valid());
291+
#ifndef NDEBUG
292+
if (extent.is_mutation_pending()) {
293+
auto &prior = static_cast<LogicalChildNode&>(
294+
*extent.get_prior_instance());
295+
assert(prior.peek_parent_node()->is_valid());
296+
} else {
297+
assert(extent.peek_parent_node()->is_valid());
298+
}
299+
#endif
292300
auto c = get_context(t);
293301
return with_btree<LBABtree>(
294302
cache,

0 commit comments

Comments
 (0)