[Devel] [PATCH hci-8.2 0/2] dm-qcow2: fix image I/O completions using a freed target

Denis V. Lunev den at openvz.org
Thu Nov 19 14:49:12 MSK 2026


Suspend waits only for the inflight references, so a completion in the
backing file system's context can still free a helper qio into the
target's pool, or queue work on its workqueue, after a remove has
destroyed them. Make the destructor wait for image I/O completions,
as the dm-ploop fix for VSTOR-155932 does, and queue the worker before
the published qio can be ended.

https://virtuozzo.atlassian.net/browse/VSTOR-156036

Applies on top of the series "dm-qcow2: fix the ENOSPC timer left armed
on a removed target".

Tested in an HCI 8.2 VM with a completion held after its request ended:
remove oopses in mempool_free() on stock and waits the hold out with
the series, and the ploop test suite passes in qcow2 and ploop formats.

Denis V. Lunev (2):
  dm-qcow2: fix image I/O completions running on a freed target
  dm-qcow2: queue the worker before dropping deferred_lock in
    completions

 drivers/md/dm-qcow2-map.c    |  7 +++----
 drivers/md/dm-qcow2-target.c | 25 +++++++++++++++++++++++++
 drivers/md/dm-qcow2.h        |  2 ++
 3 files changed, 30 insertions(+), 4 deletions(-)

-- 
2.55.0



More information about the Devel mailing list