if (!pwop->sent_reply) {
// send commit.
- MOSDOpReply *reply = pwop->ctx->reply;
- if (reply)
- pwop->ctx->reply = NULL;
- else {
- reply = new MOSDOpReply(m, r, get_osdmap_epoch(), 0, true);
- reply->set_reply_versions(eversion_t(), pwop->user_version);
- }
+ assert(pwop->ctx->reply == nullptr);
+ MOSDOpReply *reply = new MOSDOpReply(m, r, get_osdmap_epoch(), 0, true);
+ reply->set_reply_versions(eversion_t(), pwop->user_version);
reply->add_flags(CEPH_OSD_FLAG_ACK | CEPH_OSD_FLAG_ONDISK);
dout(10) << " sending commit on " << pwop << " " << reply << dendl;
osd->send_message_osd_client(reply, m->get_connection());
// prepare the reply
ctx->reply = new MOSDOpReply(m, 0, get_osdmap_epoch(), 0,
successful_write);
+ dout(20) << __func__ << " alloc reply " << ctx->reply << dendl;
// Write operations aren't allowed to return a data payload because
// we can't do so reliably. If the client has to resend the request