All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Alexander Ivanov <alexander.ivanov@virtuozzo.com>
To: Konstantin Khorenko <khorenko@virtuozzo.com>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 v9 09/10] dm-qcow2: flag the image for check after a reverted L1/L2 writeback
Date: Mon, 9 Nov 2026 11:26:39 +0100	[thread overview]
Message-ID: <2685cec7-74bb-49b7-bca6-9f7ba41db633@virtuozzo.com> (raw)
In-Reply-To: <179372824969.2555502.9529900374425809477.b4-review@b4>

Done in v10. revert_l_entries_update() now only restores the
old entries and keeps the refcount of the allocated clusters.
complete_wbd() clears FREE_ALLOCATED_CLU on the qios it ends with the
error, so the COW case behind the pe_page branch leaks its cluster too
instead of freeing it in handle_cleanup_mask().

MD_LX_REVERTED, lx_writeback_error and the resume refusal are gone,
and patch 10 no longer needs to skip the shrink for this case: a
leaked cluster keeps its refcount, so the used-end scan does not cut
it off.

On 11/3/26 18:50, Konstantin Khorenko wrote:
> I won't apply this version, please send v10 with the changes below.
>
> On 10/28/26 16:06, Alexander Ivanov wrote:
>>   		if (cleared)
>>   			continue; /* no cluster was allocated */
>>
>> +		wbd->md->status |= MD_LX_REVERTED;
> - Leak the clusters on a failed L1/L2 writeback instead of freeing
>    them.
> - If you keep freeing them, set MD_LX_REVERTED in the pe_page branch
>    above as well.
>
> The pe_page branch restores the old entry and continues before this
> line. It is taken for a COW over a compressed, snapshot-shared or
> preallocated cluster. The new cluster is still freed: the qio waiting
> on the page ends with the error, and handle_cleanup_mask() frees it
> through FREE_ALLOCATED_CLU. So L2 on disk may point to a free cluster,
> lx_writeback_error stays clear, resume is allowed, and patch 10 can
> cut that cluster off.
>
> Freeing also lets the allocator give the cluster to another offset
> before suspend, while L2 on disk still maps the old offset to it. Two
> guest offsets then share one cluster, and the check that wants_check
> asks for cannot undo that. A leaked cluster has none of this: the
> check just frees it.
>
> Leaking also needs no resume refusal. ploop does not look at
> wants_check, so with this patch a transient L2 write error leaves a
> live check or a snapshot with the device suspended.
>
_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  reply	other threads:[~2026-11-09 10:28 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 15:06 [Devel] [PATCH hci-8.1 v9 00/10] dm-qcow2: truncate unused tail of image on suspend Alexander Ivanov
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 01/10] dm-qcow2: add qcow2_md_page_read_sync() helper Alexander Ivanov
2026-10-28 15:12   ` no-reply
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09 10:32     ` Alexander Ivanov
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 02/10] dm-qcow2: drop duplicate prefix from QC_ERR/QC_INFO messages Alexander Ivanov
2026-10-28 15:10   ` no-reply
2026-11-03 17:50   ` Konstantin Khorenko
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 03/10] dm-qcow2: extend the file for a new refblock in allocate_cluster() Alexander Ivanov
2026-10-28 15:11   ` no-reply
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 04/10] dm-qcow2: complete wbd before ending the data qio Alexander Ivanov
2026-10-28 15:14   ` no-reply
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09  9:15     ` Alexander Ivanov
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 05/10] dm-qcow2: flush lower metadata before clearing its dirty bit on merge failure Alexander Ivanov
2026-10-28 15:14   ` no-reply
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09  9:16     ` Alexander Ivanov
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 06/10] dm-qcow2: keep the dirty bit of an image that needs check Alexander Ivanov
2026-10-28 15:16   ` no-reply
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 07/10] dm-qcow2: fix md page cleanup on failed reftable relocation Alexander Ivanov
2026-10-28 15:16   ` no-reply
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 08/10] dm-qcow2: flag the image for check if reftable relocation fails late Alexander Ivanov
2026-10-28 15:17   ` no-reply
2026-10-29  7:18     ` Alexander Ivanov
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09  9:17     ` Alexander Ivanov
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 09/10] dm-qcow2: flag the image for check after a reverted L1/L2 writeback Alexander Ivanov
2026-10-28 15:19   ` no-reply
2026-10-29  7:27     ` Alexander Ivanov
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09 10:26     ` Alexander Ivanov [this message]
2026-10-28 15:06 ` [Devel] [PATCH hci-8.1 v9 10/10] dm-qcow2: truncate unused tail of image on suspend Alexander Ivanov
2026-10-28 15:21   ` no-reply
2026-11-03 17:50   ` Konstantin Khorenko
2026-11-09 10:29     ` Alexander Ivanov
2026-10-29 10:55 ` [Devel] [PATCH hci-8.1 v9 00/10] " Andrey Zhadchenko
2026-11-03 17:50 ` Konstantin Khorenko
2026-11-09 11:58   ` Alexander Ivanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2685cec7-74bb-49b7-bca6-9f7ba41db633@virtuozzo.com \
    --to=alexander.ivanov@virtuozzo.com \
    --cc=devel@openvz.org \
    --cc=khorenko@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.