Due to a silly mistake, ploop_pb_init forgot to spawn health_monitor thread for full backup. The aftermath is disastrous in case of slow/hanged vz_backup_client: push_backup timeout handler moves backup state from ALIVE to STOPPING, but nobody finalizes hanged requests and moves the state to DEAD (as expected from health_monitor).
Signed-off-by: Maxim Patlasov <mpatla...@virtuozzo.com> --- drivers/block/ploop/push_backup.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/block/ploop/push_backup.c b/drivers/block/ploop/push_backup.c index f825575..8f19310 100644 --- a/drivers/block/ploop/push_backup.c +++ b/drivers/block/ploop/push_backup.c @@ -380,7 +380,6 @@ static int ploop_pb_health_monitor(void * data) int ploop_pb_init(struct ploop_pushbackup_desc *pbd, __u8 *uuid, bool full) { struct task_struct *ts; - int rc; memcpy(pbd->cbt_uuid, uuid, sizeof(pbd->cbt_uuid)); @@ -396,21 +395,20 @@ int ploop_pb_init(struct ploop_pushbackup_desc *pbd, __u8 *uuid, bool full) __clear_bit(off, page_address(pbd->ppb_map[i])); off++; } - return 0; + } else { + int rc = blk_cbt_map_copy_once(pbd->plo->queue, + uuid, + &pbd->cbt_map, + &pbd->cbt_block_max, + &pbd->cbt_block_bits); + if (rc) + return rc; + + rc = convert_map_to_map(pbd); + if (rc) + return rc; } - rc = blk_cbt_map_copy_once(pbd->plo->queue, - uuid, - &pbd->cbt_map, - &pbd->cbt_block_max, - &pbd->cbt_block_bits); - if (rc) - return rc; - - rc = convert_map_to_map(pbd); - if (rc) - return rc; - ts = kthread_create(ploop_pb_health_monitor, pbd, "ploop_pb_hm%d", pbd->plo->index); if (IS_ERR(ts)) _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel