static int do_local_io(struct request *req, uint32_t epoch) { struct sd_obj_req *hdr = (struct sd_obj_req *)&req->rq; hdr->epoch = epoch; dprintf("%x, %" PRIx64" , %u\n", hdr->opcode, hdr->oid, epoch); return do_process_work(req->op, &req->rq, &req->rp, req); }
static void do_cluster_op(void *arg) { struct vdi_op_message *msg = arg; int ret; struct request *req; void *data; req = list_first_entry(&sys->pending_list, struct request, pending_list); if (has_process_main(req->op)) data = msg->data; else data = req->data; ret = do_process_work(req->op, (const struct sd_req *)&msg->req, (struct sd_rsp *)&msg->rsp, data); msg->rsp.result = ret; }