[Devel] [PATCH hci-8.2 v2 0/2] dm-qcow2: fix a read livelock at EOF of a read-only image

Denis V. Lunev den at openvz.org
Thu Nov 19 15:51:19 MSK 2026


A read-only image whose file ends mid-page, such as a lower image made
by qemu-img convert -c, livelocks the dm-qcow2 worker on the first read
of its last compressed cluster. The fix zeroes the missing tail in the
read completion, so the zeroing helper first stops using kmap(), which
may sleep.

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

Tested in an HCI 8.2 VM: the livelock reproduces on stock and not with
the series, the debug kernel no longer warns about sleeping in atomic
context from either zeroing path, and the ploop test suite passes in
qcow2 and ploop formats.

v2: zero with memzero_page() in a separate patch, reword the message.
v1: http://lore.virtuozzo.com/kernel/20261119114802.765703-1-den@openvz.org/

Denis V. Lunev (2):
  dm-qcow2: zero qio pages with memzero_page() instead of kmap()
  dm-qcow2: fix a read livelock at EOF of a read-only image

 drivers/md/dm-qcow2-map.c | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

-- 
2.55.0



More information about the Devel mailing list