});
}
-seastar::future<std::map<uint64_t, uint64_t>> AlienStore::fiemap(
+AlienStore::read_errorator::future<std::map<uint64_t, uint64_t>> AlienStore::fiemap(
CollectionRef ch,
const ghobject_t& oid,
uint64_t off,
return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &destmap] {
auto c = static_cast<AlienCollection*>(ch.get());
return store->fiemap(c->collection, oid, off, len, destmap);
- }).then([&destmap] (int i) {
- return seastar::make_ready_future<std::map<uint64_t, uint64_t>>(
- std::move(destmap));
+ }).then([&destmap](int i) {
+ return read_errorator::make_ready_future<std::map<uint64_t, uint64_t>>(
+ std::move(destmap));
});
});
}
read_errorator::future<ceph::bufferlist> omap_get_header(
CollectionRef,
const ghobject_t&) final;
- seastar::future<std::map<uint64_t, uint64_t>> fiemap(
+ read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
CollectionRef,
const ghobject_t&,
uint64_t off,
new CyanStore::CyanOmapIterator(o));
}
-seastar::future<std::map<uint64_t, uint64_t>>
+CyanStore::read_errorator::future<std::map<uint64_t, uint64_t>>
CyanStore::fiemap(
CollectionRef ch,
const ghobject_t& oid,
CollectionRef c,
const ghobject_t& oid);
- seastar::future<std::map<uint64_t, uint64_t>> fiemap(CollectionRef c,
+ read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(CollectionRef c,
const ghobject_t& oid,
uint64_t off,
uint64_t len);
virtual seastar::future<OmapIteratorRef> get_omap_iterator(
CollectionRef ch,
const ghobject_t& oid) = 0;
- virtual seastar::future<std::map<uint64_t, uint64_t>> fiemap(
+ virtual read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
CollectionRef ch,
const ghobject_t& oid,
uint64_t off,
len);
});
}
-seastar::future<std::map<uint64_t, uint64_t>> SeaStore::fiemap(
+
+SeaStore::read_errorator::future<std::map<uint64_t, uint64_t>> SeaStore::fiemap(
CollectionRef ch,
const ghobject_t& oid,
uint64_t off,
size - off:
std::min(size - off, len);
return _fiemap(t, onode, off, adjust_len);
- }).handle_error(
- crimson::ct_error::assert_all{
- "Invalid error in SeaStore::fiemap"
});
}
seastar::future<OmapIteratorRef> get_omap_iterator(
CollectionRef ch,
const ghobject_t& oid) final;
- seastar::future<std::map<uint64_t, uint64_t>> fiemap(
+ read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
CollectionRef ch,
const ghobject_t& oid,
uint64_t off,
os.oi.soid, op.extent.offset, op.extent.length);
return interruptor::make_interruptible(store->fiemap(coll, ghobject_t{os.oi.soid},
op.extent.offset,
- op.extent.length)).then_interruptible(
+ op.extent.length)).safe_then_interruptible(
[&delta_stats, &os, &osd_op, this](auto&& m) {
return seastar::do_with(interval_set<uint64_t>{std::move(m)},
[&delta_stats, &os, &osd_op, this](auto&& extents) {
return store->stat(c, oid);
}
-PGBackend::interruptible_future<std::map<uint64_t, uint64_t>>
+PGBackend::read_errorator::future<std::map<uint64_t, uint64_t>>
PGBackend::fiemap(
CollectionRef c,
const ghobject_t& oid,
interruptible_future<struct stat> stat(
CollectionRef c,
const ghobject_t& oid) const;
- interruptible_future<std::map<uint64_t, uint64_t>> fiemap(
+ read_errorator::future<std::map<uint64_t, uint64_t>> fiemap(
CollectionRef c,
const ghobject_t& oid,
uint64_t off,
return seastar::make_ready_future<uint64_t>(offset);
}
// 1. get the extents in the interested range
- return backend->fiemap(coll, ghobject_t{oid},
- 0, copy_subset.range_end()).then_wrapped_interruptible(
+ return interruptor::make_interruptible(backend->fiemap(coll, ghobject_t{oid},
+ 0, copy_subset.range_end())).safe_then_interruptible(
[=](auto&& fiemap_included) mutable {
interval_set<uint64_t> extents;
try {
- extents.intersection_of(copy_subset, fiemap_included.get0());
+ extents.intersection_of(copy_subset, std::move(fiemap_included));
} catch (std::exception &) {
// if fiemap() fails, we will read nothing, as the intersection of
// copy_subset and an empty interval_set would be empty anyway
push_op->data_included.span_of(extents, offset, max_len);
// 3. read the truncated extents
// TODO: check if the returned extents are pruned
- return store->readv(coll, ghobject_t{oid}, push_op->data_included, 0);
+ return interruptor::make_interruptible(store->readv(coll, ghobject_t{oid},
+ push_op->data_included, 0));
}).safe_then_interruptible([push_op, range_end=copy_subset.range_end()](auto &&bl) {
push_op->data.claim_append(std::move(bl));
uint64_t recovered_to = 0;
SeaStore &seastore,
uint64_t off,
uint64_t len) {
- return seastore.fiemap(coll, oid, off, len).get0();
+ return seastore.fiemap(coll, oid, off, len).unsafe_get0();
}
bufferlist readv(