MCPcopy Create free account
hub / github.com/ceph/ceph / send

Method send

src/librbd/operation/TrimRequest.cc:71–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69 }
70
71 int send() override {
72 I &image_ctx = this->m_image_ctx;
73 ceph_assert(ceph_mutex_is_locked(image_ctx.owner_lock));
74 ceph_assert(image_ctx.exclusive_lock == nullptr ||
75 image_ctx.exclusive_lock->is_lock_owner());
76
77 {
78 std::shared_lock image_locker{image_ctx.image_lock};
79 if (image_ctx.object_map != nullptr &&
80 !image_ctx.object_map->object_may_exist(m_object_no)) {
81 return 1;
82 }
83 }
84
85 std::string oid = image_ctx.get_object_name(m_object_no);
86 ldout(image_ctx.cct, 10) << "removing " << oid << dendl;
87
88 librados::AioCompletion *rados_completion =
89 util::create_rados_callback(this);
90 int r = image_ctx.data_ctx.aio_remove(oid, rados_completion);
91 ceph_assert(r == 0);
92 rados_completion->release();
93 return 0;
94 }
95
96private:
97 uint64_t m_object_no;

Callers

nothing calls this directly

Calls 6

object_may_existMethod · 0.80
create_rados_callbackFunction · 0.50
is_lock_ownerMethod · 0.45
get_object_nameMethod · 0.45
aio_removeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected