Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc
- index 050c762..01a5c50 100644
- --- a/src/osdc/Objecter.cc
- +++ b/src/osdc/Objecter.cc
- @@ -2317,6 +2317,10 @@ void Objecter::_op_submit(Op *op, shunique_lock& sul, ceph_tid_t *ptid)
- bool check_for_latest_map = _calc_target(&op->target, nullptr)
- == RECALC_OP_TARGET_POOL_DNE;
- + op_target_t *t = &op->target;
- + ldout(cct, 20) << "test oid val:" << t->base_oid << dendl;
- + ldout(cct, 20) << "test oid val display:" << op->target.base_oid << dendl;
- +
- // Try to get a session, including a retry if we need to take write lock
- int r = _get_session(op->target.osd, &s, sul);
- if (r == -EAGAIN ||
- @@ -3115,6 +3119,29 @@ void Objecter::_send_op(Op *op, MOSDOp *m)
- // op->session->lock is locked
- // backoff?
- +
- + ldout(cct, 20) << "in send_op: test" << dendl;
- + ldout(cct, 20) << op->ops << dendl;
- + for (vector<OSDOp>::iterator p = op->ops.begin(); p != op->ops.end(); ++p) {
- + ldout(cct, 20) << p->op.op << dendl;
- + if (p->op.op == CEPH_OSD_OP_SPARSE_READ) {
- + ldout(cct, 20) << "OP_SPARSE_READ" << dendl;
- + return handle_alt_osd_reply(op);
- + }
- + if (p->op.op == CEPH_OSD_OP_WRITE) {
- + ldout(cct, 20) << "OP_WRITE" << dendl;
- + ldout(cct, 20) << p->op.flags << dendl;
- + }
- + if (p->op.op == CEPH_OSD_OP_WRITEFULL) {
- + ldout(cct, 20) << "OP_WRITEFULL" << dendl;
- + ldout(cct, 20) << p->op.flags << dendl;
- + }
- + if (p->op.op == CEPH_OSD_OP_WRITESAME) {
- + ldout(cct, 20) << "OP_WRITESAME" << dendl;
- + ldout(cct, 20) << p->op.flags << dendl;
- + }
- + }
- + // ldout(cct, 20) << "found sparse read in op" << dendl;
- hobject_t hoid = op->target.get_hobj();
- auto p = op->session->backoffs.find(op->target.actual_pgid);
- if (p != op->session->backoffs.end()) {
- @@ -3238,6 +3265,33 @@ void Objecter::unregister_op(Op *op)
- inflight_ops.dec();
- }
- +void Objecter::handle_alt_osd_reply(Op *op)
- +{
- + ldout(cct, 10) << "in handle_alt_reply" << dendl;
- +
- + /*unsigned len = 20;
- + std::string str(len, 'c');
- + (op->out_bl[0])->append(str.c_str(), 20);*/
- +
- + //Context* handler = op->out_handler[0];
- + //handler->complete(0);
- +
- + Context *onfinish = 0;
- +
- + if (op->onfinish) {
- + num_in_flight.dec();
- + onfinish = op->onfinish;
- + op->onfinish = NULL;
- + }
- +
- + _finish_op(op, 0);
- +
- + // do callbacks
- + if (onfinish) {
- + onfinish->complete(0);
- + }
- +}
- +
- /* This function DOES put the passed message before returning */
- void Objecter::handle_osd_op_reply(MOSDOpReply *m)
- {
- @@ -3285,6 +3339,7 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
- << " attempt " << m->get_retry_attempt()
- << dendl;
- Op *op = iter->second;
- + ldout(cct, 7) << "handle_osd: check what op is:" << iter->second << dendl;
- if (retry_writes_after_first_reply && op->attempts == 1 &&
- (op->target.flags & CEPH_OSD_FLAG_WRITE)) {
- @@ -3366,6 +3421,7 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
- *op->data_offset = m->get_header().data_off;
- // got data?
- + ldout(cct, 7) << "handle_osd: check outbl:" << op->outbl << dendl;
- if (op->outbl) {
- if (op->con)
- op->con->revoke_rx_buffer(op->tid);
- @@ -3383,6 +3439,8 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
- << " from " << m->get_source_inst() << dendl;
- vector<bufferlist*>::iterator pb = op->out_bl.begin();
- + ldout(cct, 7) << "handle_osd: check op->out_bl:-" << pb[0] << dendl;
- +
- vector<int*>::iterator pr = op->out_rval.begin();
- vector<Context*>::iterator ph = op->out_handler.begin();
- assert(op->out_bl.size() == op->out_rval.size());
- @@ -3393,8 +3451,13 @@ void Objecter::handle_osd_op_reply(MOSDOpReply *m)
- ++i, ++p, ++pb, ++pr, ++ph) {
- ldout(cct, 10) << " op " << i << " rval " << p->rval
- << " len " << p->outdata.length() << dendl;
- + ldout(cct, 10) << "handle_osd: pb datatype:- " << *pb << dendl;
- if (*pb)
- **pb = p->outdata;
- + ldout(cct, 10) << "handle_osd: p datatype:- " << *p << dendl;
- + ldout(cct, 10) << "handle_osd: check pbdata:- " << (p->outdata).buffers().back().get_raw() << dendl;
- + //ldout(cct, 10) << "handle_osd: check pbdata:-" << **pb << dendl;
- +
- // set rval before running handlers so that handlers
- // can change it if e.g. decoding fails
- if (*pr)
Add Comment
Please, Sign In to add comment