Add missing refcounting for flush_batch errors
This commit is contained in:
@@ -76,6 +76,7 @@ void osd_t::handle_flush_op(bool rollback, pool_id_t pool_id, pg_num_t pg_num, p
|
|||||||
// Throw the result away
|
// Throw the result away
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
fb->flush_done++;
|
||||||
if (retval != 0)
|
if (retval != 0)
|
||||||
{
|
{
|
||||||
if (peer_osd == this->osd_num)
|
if (peer_osd == this->osd_num)
|
||||||
@@ -93,12 +94,11 @@ void osd_t::handle_flush_op(bool rollback, pool_id_t pool_id, pg_num_t pg_num, p
|
|||||||
auto fd_it = msgr.osd_peer_fds.find(peer_osd);
|
auto fd_it = msgr.osd_peer_fds.find(peer_osd);
|
||||||
if (fd_it != msgr.osd_peer_fds.end())
|
if (fd_it != msgr.osd_peer_fds.end())
|
||||||
{
|
{
|
||||||
|
// Will repeer/stop this PG
|
||||||
msgr.stop_client(fd_it->second);
|
msgr.stop_client(fd_it->second);
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fb->flush_done++;
|
|
||||||
if (fb->flush_done == fb->flush_ops)
|
if (fb->flush_done == fb->flush_ops)
|
||||||
{
|
{
|
||||||
// This flush batch is done
|
// This flush batch is done
|
||||||
|
|||||||
@@ -7,6 +7,12 @@
|
|||||||
bool osd_t::check_write_queue(osd_op_t *cur_op, pg_t & pg)
|
bool osd_t::check_write_queue(osd_op_t *cur_op, pg_t & pg)
|
||||||
{
|
{
|
||||||
osd_primary_op_data_t *op_data = cur_op->op_data;
|
osd_primary_op_data_t *op_data = cur_op->op_data;
|
||||||
|
// First check if PG is not active anymore
|
||||||
|
if (!(pg.state & PG_ACTIVE))
|
||||||
|
{
|
||||||
|
pg_cancel_write_queue(pg, cur_op, op_data->oid, -EPIPE);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
// Check if actions are pending for this object
|
// Check if actions are pending for this object
|
||||||
auto act_it = pg.flush_actions.lower_bound((obj_piece_id_t){
|
auto act_it = pg.flush_actions.lower_bound((obj_piece_id_t){
|
||||||
.oid = op_data->oid,
|
.oid = op_data->oid,
|
||||||
|
|||||||
Reference in New Issue
Block a user