On Mar 3, 2013, at 6:31 PM, Yehuda Sadeh <[email protected]> wrote:
> I pushed the wip-librados-exec branch last week that solves a similar
> issue. I added two more ObjectOperation::exec() api calls. The more
> interesting one added a callback context that is called with the
> output buffer of the completed sub-op. Currently in order to use it
> you'll need to use operate()/aio_operate(), however, a similar
> aio_exec interface can be added.
Thanks for the pointer to the branch. So, if I understand correctly,
we might have a new librados::aio_exec_completion call that accepts
a completion object? For example:
aio_exec_completion(AioCompletion *c, bufferlist *outbl,
ObjectOperationCompletion* completion)
{
Context *onack = new C_aio_Ack(c);
::ObjectOperation rd;
ObjectOpCompletionCtx *ctx = new ObjectOpCompletionCtx(completion);
rd.call(cls, method, inbl, ctx->outbl, ctx, NULL);
objecter->read(oid, oloc, rd, snap_seq, outbl, 0, onack, &c->objver);
return 0;
}
where the caller would provide an ObjectOperationCompletion where it's
finish(..) would unwrap the protocol?
Do you expect wip-librados-exec going up stream pretty soon, and would
something like librados::aio_exec_completion be a candidate for adding
to librados?
Thanks,
Noah
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html