Skip to content

Commit 9c73fc6

Browse files
committed
crimson/os/seastore: misc adjustments
Signed-off-by: Yingxin Cheng <[email protected]>
1 parent 027be57 commit 9c73fc6

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/crimson/os/seastore/lba_manager/btree/btree_lba_manager.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,16 @@ BtreeLBAManager::_alloc_extents(
435435
ceph_assert(alloc_info.val.is_paddr());
436436
assert(alloc_info.val == iter.get_val().pladdr);
437437
assert(alloc_info.len == iter.get_val().len);
438+
assert(alloc_info.extent->is_logical());
438439
if (alloc_info.extent->has_laddr()) {
440+
// see TM::remap_pin()
439441
assert(alloc_info.key == alloc_info.extent->get_laddr());
440442
assert(alloc_info.key == iter.get_key());
441443
} else {
444+
// see TM::alloc_non_data_extent()
445+
// TM::alloc_data_extents()
442446
alloc_info.extent->set_laddr(iter.get_key());
443447
}
444-
alloc_info.extent->set_laddr(iter.get_key());
445448
}
446449
ceph_assert(inserted);
447450
rets.emplace_back(iter.get_pin(c));

src/crimson/os/seastore/transaction_manager.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ class TransactionManager : public ExtentCallbackInterface {
210210
).si_then([this, FNAME, &t, offset, length] (auto pin)
211211
-> read_extent_ret<T> {
212212
if (length != pin->get_length() || !pin->get_val().is_real()) {
213-
SUBERRORT(seastore_tm, "{}~0x{:x} {} got wrong {}",
213+
SUBERRORT(seastore_tm, "{}~0x{:x} {} got wrong pin {}",
214214
t, offset, length, T::TYPE, *pin);
215-
ceph_assert(0 == "Should be impossible");
215+
ceph_abort("Impossible");
216216
}
217217
return this->read_pin<T>(t, std::move(pin));
218218
});
@@ -235,9 +235,9 @@ class TransactionManager : public ExtentCallbackInterface {
235235
).si_then([this, FNAME, &t, offset] (auto pin)
236236
-> read_extent_ret<T> {
237237
if (!pin->get_val().is_real()) {
238-
SUBERRORT(seastore_tm, "{} {} got wrong {}",
238+
SUBERRORT(seastore_tm, "{} {} got wrong pin {}",
239239
t, offset, T::TYPE, *pin);
240-
ceph_assert(0 == "Should be impossible");
240+
ceph_abort("Impossible");
241241
}
242242
return this->read_pin<T>(t, std::move(pin));
243243
});

0 commit comments

Comments
 (0)