Browse Source

Free op->bs_op manually

trace-sqes
Vitaliy Filippov 1 year ago
parent
commit
256a7f2667
  1. 5
      osd.cpp
  2. 2
      osd_flush.cpp
  3. 6
      osd_peering.cpp
  4. 7
      osd_primary_subops.cpp
  5. 5
      osd_secondary.cpp

5
osd.cpp

@ -68,10 +68,7 @@ osd_t::~osd_t()
osd_op_t::~osd_op_t()
{
if (bs_op)
{
delete bs_op;
}
assert(!bs_op);
if (op_data)
{
free(op_data);

2
osd_flush.cpp

@ -166,6 +166,8 @@ void osd_t::submit_flush_op(pg_num_t pg_num, pg_flush_batch_t *fb, bool rollback
{
add_bs_subop_stats(op);
handle_flush_op(bs_op->opcode == BS_OP_ROLLBACK, pg_num, fb, this->osd_num, bs_op->retval);
delete op->bs_op;
op->bs_op = NULL;
delete op;
},
.len = (uint32_t)count,

6
osd_peering.cpp

@ -419,6 +419,8 @@ void osd_t::submit_sync_and_list_subop(osd_num_t role_osd, pg_peering_state_t *p
return;
}
add_bs_subop_stats(op);
delete op->bs_op;
op->bs_op = NULL;
delete op;
ps->list_ops.erase(role_osd);
submit_list_subop(role_osd, ps);
@ -494,6 +496,8 @@ void osd_t::submit_list_subop(osd_num_t role_osd, pg_peering_state_t *ps)
.stable_count = op->bs_op->version,
};
ps->list_ops.erase(role_osd);
delete op->bs_op;
op->bs_op = NULL;
delete op;
};
bs->enqueue_op(op->bs_op);
@ -557,6 +561,8 @@ void osd_t::discard_list_subop(osd_op_t *list_op)
{
if (list_op->bs_op->buf)
free(list_op->bs_op->buf);
delete list_op->bs_op;
list_op->bs_op = NULL;
delete list_op;
};
}

7
osd_primary_subops.cpp

@ -204,7 +204,12 @@ void osd_t::handle_primary_bs_subop(osd_op_t *subop)
);
}
add_bs_subop_stats(subop);
handle_primary_subop(bs_op_to_osd_op[bs_op->opcode], cur_op, bs_op->retval, expected, bs_op->version);
uint64_t opcode = bs_op_to_osd_op[bs_op->opcode];
int retval = bs_op->retval;
uint64_t version = bs_op->version;
delete bs_op;
subop->bs_op = NULL;
handle_primary_subop(opcode, cur_op, retval, expected, version);
}
void osd_t::add_bs_subop_stats(osd_op_t *subop)

5
osd_secondary.cpp

@ -28,7 +28,10 @@ void osd_t::secondary_op_callback(osd_op_t *op)
}
op->reply.sec_list.stable_count = op->bs_op->version;
}
finish_op(op, op->bs_op->retval);
int retval = op->bs_op->retval;
delete op->bs_op;
op->bs_op = NULL;
finish_op(op, retval);
}
void osd_t::exec_secondary(osd_op_t *cur_op)

Loading…
Cancel
Save