[Devel] [PATCH hci-8.1 v2 0/3] dm-qcow2: fix merges not stopping the users of the images they change
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Nov 4 19:59:49 MSK 2026
I won't apply this version, please send v2 with the changes below.
On 11/3/26 10:08, Denis V. Lunev wrote:
> Denis V. Lunev (3):
> dm-qcow2: fix a failed refcount table relocation leaking md pages
> dm-qcow2: fix backward merge of an inner image racing its reads
> dm-qcow2: fix SEEK_HOLE/SEEK_DATA using an image freed by a merge
What to change for v2:
1. Patch 1, code: after a successful header write, the error gotos
must not free the new md pages. Send them to a label after the free
loop that only returns -EIO, and update the "Note for a future
reader" to match.
2. Patch 2, code comment: write "no guest writes" instead of "no
writes".
3. Patch 2, commit message: say that guest I/O to the top image is now
paused for the inflight ref switch when a merge of an inner image
starts or stops.
4. Patch 3, commit message: say that merge_backward complete now waits
for a running seek while it holds ctl_mutex.
5. Cover letter: fix the bullet on patch 2 quoted below.
Separate patches, not needed for v2:
6. relocate_refcount_table(): the refcount group of the new reftable
gets no refblock when the table fills that whole group.
7. qcow2_llseek_hole(): a seek waits forever when one of its md page
reads fails.
The details are in the replies to each patch.
> - a backward merge of an inner image pauses that image, while reads
> enter through the top one. A read reaching the inner image as the
> merge starts oopses on a NULL qio->ext (patch 2);
Item 5: before the series the start of an inner merge paused nothing,
only the stop paused the inner image. Say that the start paused nothing.
--
Konstantin Khorenko,
Virtuozzo Linux Kernel Team
More information about the Devel
mailing list