Reply using a single finish_op() method, allow to call OSD ops from inside the OSD

This commit is contained in:
Vitaliy Filippov
2020-03-24 00:18:52 +03:00
parent 036f4c5bf3
commit dbd8418798
4 changed files with 48 additions and 51 deletions
+8 -1
View File
@@ -376,7 +376,14 @@ void osd_t::exec_op(osd_op_t *cur_op)
cur_op->reply.hdr.id = cur_op->req.hdr.id;
cur_op->reply.hdr.opcode = cur_op->req.hdr.opcode;
cur_op->reply.hdr.retval = -EINVAL;
outbox_push(this->clients[cur_op->peer_fd], cur_op);
if (cur_op->peer_fd)
{
outbox_push(this->clients[cur_op->peer_fd], cur_op);
}
else
{
cur_op->callback(cur_op);
}
return;
}
inflight_ops++;