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

Method migrate_objects

src/librbd/operation/MigrateRequest.cc:188–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186
187template <typename I>
188void MigrateRequest<I>::migrate_objects() {
189 I &image_ctx = this->m_image_ctx;
190 CephContext *cct = image_ctx.cct;
191 ceph_assert(ceph_mutex_is_locked(image_ctx.owner_lock));
192
193 uint64_t overlap_objects = get_num_overlap_objects();
194
195 ldout(cct, 10) << "from 0 to " << overlap_objects << dendl;
196
197 auto ctx = create_context_callback<
198 MigrateRequest<I>, &MigrateRequest<I>::handle_migrate_objects>(this);
199
200 typename AsyncObjectThrottle<I>::ContextFactory context_factory(
201 boost::lambda::bind(boost::lambda::new_ptr<C_MigrateObject<I> >(),
202 boost::lambda::_1, &image_ctx, image_ctx.get_data_io_context(),
203 boost::lambda::_2));
204 AsyncObjectThrottle<I> *throttle = new AsyncObjectThrottle<I>(
205 this, image_ctx, context_factory, ctx, &m_prog_ctx, 0, overlap_objects);
206 throttle->start_ops(
207 image_ctx.config.template get_val<uint64_t>("rbd_concurrent_management_ops"));
208}
209
210template <typename I>
211void MigrateRequest<I>::handle_migrate_objects(int r) {

Callers

nothing calls this directly

Calls 3

bindClass · 0.85
start_opsMethod · 0.80
get_data_io_contextMethod · 0.45

Tested by

no test coverage detected