[Devel] [PATCH hci-8.1 v2 2/9] drivers/md/dm-qcow2: always resubmit delayed ENOSPC requests in presuspend
Alexander Ivanov
alexander.ivanov at virtuozzo.com
Tue Nov 17 13:10:19 MSK 2026
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
Fixes: 2f9926b51be7 ("dm-qcow2: Rename MERGE_QIOS_MAX")
Feature: dm-qcow2: block device over QCOW2 files driver
Signed-off-by: Alexander Ivanov <alexander.ivanov at virtuozzo.com>
---
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
More information about the Devel
mailing list