| 84 | |
| 85 | template <typename I> |
| 86 | void FlattenRequest<I>::flatten_objects() { |
| 87 | I &image_ctx = this->m_image_ctx; |
| 88 | ceph_assert(ceph_mutex_is_locked(image_ctx.owner_lock)); |
| 89 | |
| 90 | CephContext *cct = image_ctx.cct; |
| 91 | ldout(cct, 5) << dendl; |
| 92 | |
| 93 | assert(ceph_mutex_is_locked(image_ctx.owner_lock)); |
| 94 | auto ctx = create_context_callback< |
| 95 | FlattenRequest<I>, |
| 96 | &FlattenRequest<I>::handle_flatten_objects>(this); |
| 97 | typename AsyncObjectThrottle<I>::ContextFactory context_factory( |
| 98 | boost::lambda::bind(boost::lambda::new_ptr<C_FlattenObject<I> >(), |
| 99 | boost::lambda::_1, &image_ctx, image_ctx.get_data_io_context(), |
| 100 | boost::lambda::_2)); |
| 101 | AsyncObjectThrottle<I> *throttle = new AsyncObjectThrottle<I>( |
| 102 | this, image_ctx, context_factory, ctx, &m_prog_ctx, m_start_object_no, |
| 103 | m_start_object_no + m_overlap_objects); |
| 104 | throttle->start_ops( |
| 105 | image_ctx.config.template get_val<uint64_t>("rbd_concurrent_management_ops")); |
| 106 | } |
| 107 | |
| 108 | template <typename I> |
| 109 | void FlattenRequest<I>::handle_flatten_objects(int r) { |
nothing calls this directly
no test coverage detected