qcow2_presuspend() skips resubmitting tgt->enospc_qios when timer_delete_sync_try() finds qcow2_enospc_timer() running, assuming the callback resubmits them. But the callback takes the list at its start, so a request delayed after that stays on the list, and suspend waits until the timer this request armed fires.
Wait for the callback with timer_delete_sync() and resubmit the list unconditionally. wants_suspend is already set, so no request is delayed after that. https://virtuozzo.atlassian.net/browse/VSTOR-152175 Feature: dm-qcow2: block device over QCOW2 files driver Signed-off-by: Alexander Ivanov <[email protected]> --- drivers/md/dm-qcow2-target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-qcow2-target.c b/drivers/md/dm-qcow2-target.c index c49b0f466867..aa0bbb6b4a97 100644 --- a/drivers/md/dm-qcow2-target.c +++ b/drivers/md/dm-qcow2-target.c @@ -1165,8 +1165,8 @@ static void qcow2_presuspend(struct dm_target *ti) qcow2_set_service_operations(ti, false); qcow2_set_wants_suspend(ti, true); - if (timer_delete_sync_try(&tgt->enospc_timer) != -1) - qcow2_enospc_timer(&tgt->enospc_timer); + timer_delete_sync(&tgt->enospc_timer); + qcow2_enospc_timer(&tgt->enospc_timer); } static void qcow2_presuspend_undo(struct dm_target *ti) { -- 2.53.0 _______________________________________________ Devel mailing list [email protected] https://lists.openvz.org/mailman/listinfo/devel
