}
ctx->pg->close_op_ctx(ctx);
}
- delete results;
}
bool is_temp_obj_used() {
ReplicatedPG::CopyResults *results_data = results.get<1>();
int r = results.get<0>();
pg->finish_promote(r, op, results_data, obc, temp_obj);
- delete results_data;
}
};
// list snaps too.
assert(cop->src.snap == CEPH_NOSNAP);
ObjectOperation op;
- op.list_snaps(&cop->results->snapset, NULL);
+ op.list_snaps(&cop->results.snapset, NULL);
osd->objecter_lock.Lock();
tid_t tid = osd->objecter->read(cop->src.oid, cop->oloc, op,
CEPH_SNAPDIR, NULL,
}
ObjectOperation op;
- if (cop->results->user_version) {
- op.assert_version(cop->results->user_version);
+ if (cop->results.user_version) {
+ op.assert_version(cop->results.user_version);
} else {
// we should learn the version after the first chunk, if we didn't know
// it already!
assert(cop->cursor.is_initial());
}
op.copy_get(&cop->cursor, cct->_conf->osd_copyfrom_max_chunk,
- &cop->results->object_size, &cop->results->mtime,
- &cop->results->category,
+ &cop->results.object_size, &cop->results.mtime,
+ &cop->results.category,
&cop->attrs, &cop->data, &cop->omap_header, &cop->omap,
- &cop->results->snaps, &cop->results->snap_seq,
+ &cop->results.snaps, &cop->results.snap_seq,
&cop->rval);
C_Copyfrom *fin = new C_Copyfrom(this, obc->obs.oi.soid,
flags,
gather.new_sub(),
// discover the object version if we don't know it yet
- cop->results->user_version ? NULL : &cop->results->user_version);
+ cop->results.user_version ? NULL : &cop->results.user_version);
fin->tid = tid;
cop->objecter_tid = tid;
gather.activate();
_copy_some(cobc, cop);
return;
}
- _build_finish_copy_transaction(cop, cop->results->final_tx);
+ _build_finish_copy_transaction(cop, cop->results.final_tx);
}
dout(20) << __func__ << " complete; committing" << dendl;
- CopyCallbackResults results(r, cop->results);
+ CopyCallbackResults results(r, &cop->results);
cop->cb->complete(results);
copy_ops.erase(cobc->obs.oi.soid);
{
dout(10) << __func__ << " " << cop->obc->obs.oi.soid
<< " from " << cop->src << " " << cop->oloc
- << " v" << cop->results->user_version << dendl;
+ << " v" << cop->results.user_version << dendl;
// cancel objecter op, if we can
if (cop->objecter_tid) {
cop->obc->stop_block();
kick_object_context_blocked(cop->obc);
- cop->results->should_requeue = requeue;
- CopyCallbackResults result(-ECANCELED, cop->results);
+ cop->results.should_requeue = requeue;
+ CopyCallbackResults result(-ECANCELED, &cop->results);
cop->cb->complete(result);
}