Assign .req as a whole to always zero out the remaining part

Also clear .reply before processing the operation
This commit is contained in:
Vitaliy Filippov
2021-03-24 14:20:56 +03:00
parent cf9a641d66
commit 04a1f18fa5
2 changed files with 8 additions and 6 deletions
+2
View File
@@ -191,6 +191,8 @@ void osd_t::exec_op(osd_op_t *cur_op)
delete cur_op;
return;
}
// Clear the reply buffer
memset(cur_op->reply.buf, 0, OSD_PACKET_SIZE);
inflight_ops++;
if (cur_op->req.hdr.magic != SECONDARY_OSD_OP_MAGIC ||
cur_op->req.hdr.opcode < OSD_OP_MIN || cur_op->req.hdr.opcode > OSD_OP_MAX ||