[Devel] [PATCH hci-8.2 v3 1/7] dm-qcow2: always resubmit delayed ENOSPC requests in presuspend

Alexander Ivanov alexander.ivanov at virtuozzo.com
Tue Dec 1 11:50:03 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.

2f9926b51be7 replaced del_timer_sync() there with
timer_delete_sync_try() in passing.

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>
Reviewed-by: Sashiko <no-reply at sashiko.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 a109392b9bdd..dddea4af21a4 100644
--- a/drivers/md/dm-qcow2-target.c
+++ b/drivers/md/dm-qcow2-target.c
@@ -1168,8 +1168,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