}
}
- librados::AioCompletion *c = rados->aio_create_completion(NULL, NULL, NULL);
+ librados::AioCompletion *c = rados->aio_create_completion(nullptr, nullptr);
completions.push_back(c);
// generate object
ret = io_ctx.aio_write(info.name, c, bl, buf_len, info.len - buf_len);
void LoadGen::run_op(LoadGenOp *op)
{
- op->completion = rados->aio_create_completion(op, _load_gen_cb, NULL);
+ op->completion = rados->aio_create_completion(op, _load_gen_cb);
switch (op->type) {
case OP_READ:
completions = NULL;
}
int create_completion(int slot, void (*cb)(void *, void*), void *arg) override {
- completions[slot] = rados.aio_create_completion((void *) arg, 0, cb);
+ completions[slot] = rados.aio_create_completion((void *) arg, cb);
if (!completions[slot])
return -EINVAL;
}
bool completion_is_done(int slot) override {
- return completions[slot]->is_safe();
+ return completions[slot]->is_complete();
}
int completion_wait(int slot) override {
- return completions[slot]->wait_for_safe_and_cb();
+ return completions[slot]->wait_for_complete_and_cb();
}
int completion_ret(int slot) override {
return completions[slot]->get_return_value();
librados::OPERATION_IGNORE_CACHE |
librados::OPERATION_IGNORE_OVERLAY,
NULL);
- completion->wait_for_safe();
+ completion->wait_for_complete();
int r = completion->get_return_value();
completion->release();
return r;
librados::OPERATION_IGNORE_OVERLAY |
librados::OPERATION_SKIPRWLOCKS,
NULL);
- completion->wait_for_safe();
+ completion->wait_for_complete();
int r = completion->get_return_value();
completion->release();
return r;
librados::OPERATION_IGNORE_OVERLAY |
librados::OPERATION_SKIPRWLOCKS,
NULL);
- completion->wait_for_safe();
+ completion->wait_for_complete();
int r = completion->get_return_value();
completion->release();
return r;
auto completion = librados::Rados::aio_create_completion();
ret = do_get_inconsistent(rados, pg, start, max_item_num, completion,
&items, &interval);
- completion->wait_for_safe();
+ completion->wait_for_complete();
ret = completion->get_return_value();
completion->release();
if (ret < 0) {
rados_aio_create_completion(0, 0, 0, &b);
rados_aio_write(io_ctx, "a", a, buf, 100, 0);
rados_aio_write(io_ctx, "../b/bb_bb_bb\\foo\\bar", b, buf, 100, 0);
- rados_aio_wait_for_safe(a);
+ rados_aio_wait_for_complete(a);
printf("a safe\n");
- rados_aio_wait_for_safe(b);
+ rados_aio_wait_for_complete(b);
printf("b safe\n");
rados_aio_release(a);
rados_aio_release(b);