when using rados_read_op_read.
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
if (op->reply_epoch)
*op->reply_epoch = m->get_map_epoch();
+ // got data?
+ if (op->outbl) {
+ if (op->con)
+ op->con->revoke_rx_buffer(op->tid);
+ m->claim_data(*op->outbl);
+ op->outbl = 0;
+ }
+
// per-op result demuxing
vector<OSDOp> out_ops;
m->claim_ops(out_ops);
logger->inc(l_osdc_op_commit);
}
- // got data?
- if (op->outbl) {
- if (op->con)
- op->con->revoke_rx_buffer(op->tid);
- m->claim_data(*op->outbl);
- op->outbl = 0;
- }
-
/* get it before we call _finish_op() */
Mutex *completion_lock = (op->target.base_oid.name.size() ? s->get_lock(op->target.base_oid) : NULL);
o->priority = op.priority;
o->snapid = snapid;
o->outbl = pbl;
+ if (!o->outbl && op.size() == 1 && op.out_bl[0]->length())
+ o->outbl = op.out_bl[0];
o->out_bl.swap(op.out_bl);
o->out_handler.swap(op.out_handler);
o->out_rval.swap(op.out_rval);