odata->name = obj;
get_obj.omap_get_vals("", LONG_MAX, &odata->omap, &err);
get_obj.getxattr("unwritable", &unw_bl, &err);
- err = io_ctx.aio_operate(obj, obj_aioc, &get_obj, NULL);
+ io_ctx.aio_operate(obj, obj_aioc, &get_obj, NULL);
obj_aioc->wait_for_safe();
err = obj_aioc->get_return_value();
if (err < 0){
bufferlist inbl;
args->encode(inbl);
bufferlist outbl;
+ int err;
librados::AioCompletion * a = rados.aio_create_completion();
- int err = io_ctx.aio_exec(obj, a, "kvs", "maybe_read_for_balance",
- inbl, &outbl);
+ io_ctx.aio_exec(obj, a, "kvs", "maybe_read_for_balance", inbl, &outbl);
a->wait_for_safe();
err = a->get_return_value();
if (err < 0) {
<< idata.obj
<< std::endl;
err = read_index(key, &idata, NULL, true);
+ if (err < 0) {
+ if (verbose) cout << "\t" << client_name
+ << ": getting oid failed with code "
+ << err << std::endl;
+ return err;
+ }
err = split(idata);
if (err < 0 && err != -ENOENT && err != -EBALANCE) {
if (verbose) cerr << "\t" << client_name << ": split failed with "
if (verbose) cerr << "\t" << client_name << ": running rebalance on "
<< idata.obj << std::endl;
err = read_index(key, &idata, &next_idata, true);
+ if (err < 0) {
+ if (verbose) cout << "\t" << client_name
+ << ": getting oid failed with code "
+ << err << std::endl;
+ return err;
+ }
err = rebalance(idata, next_idata);
if (err < 0 && err != -ENOENT && err != -EBALANCE) {
if (verbose) cerr << "\t" << client_name << ": rebalance returned "
librados::AioCompletion * aioc = rados.aio_create_completion();
bufferlist un;
oro.getxattr("unwritable", &un, &err);
- err = io_ctx.aio_operate(dit->obj, aioc, &oro, NULL);
+ io_ctx.aio_operate(dit->obj, aioc, &oro, NULL);
aioc->wait_for_safe();
err = aioc->get_return_value();
if (ceph_clock_now(g_ceph_context) - idata.ts > timeout) {