});
}
+base_iertr::future<> LBAMapping::co_refresh()
+{
+ if (is_viewable()) {
+ co_return;
+ }
+ if (direct_cursor) {
+ co_await direct_cursor->refresh();
+ }
+ if (indirect_cursor) {
+ co_await indirect_cursor->refresh();
+ }
+}
+
bool LBAMapping::is_initial_pending() const {
assert(is_linked_direct());
ceph_assert(direct_cursor->is_viewable());
LogicalChildNodeRef peek_logical_extent(Transaction &t) const;
+ // [[deprecated]]
//TODO: should be changed to return future<> once all calls
// to refresh are through co_await. We return LBAMapping
// for now to avoid mandating the callers to make sure
// the life of the lba mapping survives the refresh.
base_iertr::future<LBAMapping> refresh();
+ // once the deprecated refresh is removed we can rename this to refresh
+ base_iertr::future<> co_refresh();
+
base_iertr::future<LBAMapping> next();
private:
// must be user-oriented required by maybe_init
assert(is_user_transaction(t.get_src()));
- pin = co_await pin.refresh();
+ co_await pin.co_refresh();
if (pin.is_indirect()) {
pin = co_await lba_manager->complete_indirect_lba_mapping(
SUBDEBUGT(seastore_tm,
"src_base={}, dst_base={}, {}~{}, mapping={}, pos={}, updateref={}",
t, src_base, dst_base, offset, len, mapping, pos, updateref);
- pos = co_await pos.refresh();
+ co_await pos.co_refresh();
mapping = co_await mapping.refresh();
auto left = len;
bool shared_direct = false;
if (pin.is_indirect()) {
SUBDEBUGT(seastore_tm, "{} into {} remaps ...",
t, pin, remaps.size());
- pin = co_await pin.refresh();
+ co_await pin.co_refresh();
pin = co_await lba_manager->complete_indirect_lba_mapping(t, pin);
} else {
laddr_t original_laddr = pin.get_key();
ceph_assert(!pin.is_clone());
TCachedExtentRef<T> extent;
- pin = co_await pin.refresh();
+ co_await pin.co_refresh();
if (full_extent_integrity_check) {
SUBTRACET(seastore_tm, "{} reading pin...", t, pin);
// read the entire extent from disk (See: pin_to_extent)