| 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 | |
| 96 | private: |
| 97 | uint64_t m_object_no; |
nothing calls this directly
no test coverage detected