mirror of
https://github.com/ceph/ceph
synced 2024-12-28 22:43:29 +00:00
crimson: fix object not exist when do fiemap
Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
This commit is contained in:
parent
2bc57d3fc3
commit
50bd0c7641
@ -586,9 +586,14 @@ AlienStore::read_errorator::future<std::map<uint64_t, uint64_t>> AlienStore::fie
|
|||||||
return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &destmap] {
|
return tp->submit(ch->get_cid().hash_to_shard(tp->size()), [=, &destmap] {
|
||||||
auto c = static_cast<AlienCollection*>(ch.get());
|
auto c = static_cast<AlienCollection*>(ch.get());
|
||||||
return store->fiemap(c->collection, oid, off, len, destmap);
|
return store->fiemap(c->collection, oid, off, len, destmap);
|
||||||
}).then([&destmap](int i) {
|
}).then([&destmap](int r)
|
||||||
return read_errorator::make_ready_future<std::map<uint64_t, uint64_t>>(
|
-> read_errorator::future<std::map<uint64_t, uint64_t>> {
|
||||||
std::move(destmap));
|
if (r == -ENOENT) {
|
||||||
|
return crimson::ct_error::enoent::make();
|
||||||
|
} else {
|
||||||
|
return read_errorator::make_ready_future<std::map<uint64_t, uint64_t>>(
|
||||||
|
std::move(destmap));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -231,6 +231,11 @@ PGBackend::read_ierrorator::future<>
|
|||||||
PGBackend::sparse_read(const ObjectState& os, OSDOp& osd_op,
|
PGBackend::sparse_read(const ObjectState& os, OSDOp& osd_op,
|
||||||
object_stat_sum_t& delta_stats)
|
object_stat_sum_t& delta_stats)
|
||||||
{
|
{
|
||||||
|
if (!os.exists || os.oi.is_whiteout()) {
|
||||||
|
logger().debug("{}: {} DNE", __func__, os.oi.soid);
|
||||||
|
return crimson::ct_error::enoent::make();
|
||||||
|
}
|
||||||
|
|
||||||
const auto& op = osd_op.op;
|
const auto& op = osd_op.op;
|
||||||
logger().trace("sparse_read: {} {}~{}",
|
logger().trace("sparse_read: {} {}~{}",
|
||||||
os.oi.soid, op.extent.offset, op.extent.length);
|
os.oi.soid, op.extent.offset, op.extent.length);
|
||||||
|
Loading…
Reference in New Issue
Block a user