mirror of
https://github.com/ceph/ceph
synced 2024-12-28 06:23:08 +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] {
|
||||
auto c = static_cast<AlienCollection*>(ch.get());
|
||||
return store->fiemap(c->collection, oid, off, len, destmap);
|
||||
}).then([&destmap](int i) {
|
||||
return read_errorator::make_ready_future<std::map<uint64_t, uint64_t>>(
|
||||
std::move(destmap));
|
||||
}).then([&destmap](int r)
|
||||
-> read_errorator::future<std::map<uint64_t, uint64_t>> {
|
||||
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,
|
||||
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;
|
||||
logger().trace("sparse_read: {} {}~{}",
|
||||
os.oi.soid, op.extent.offset, op.extent.length);
|
||||
|
Loading…
Reference in New Issue
Block a user