All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: svt-core@virtuozzo.com
Subject: Re: [PATCH hci-8.1 1/1] qcow2: fix subcluster discard punching data shared with a snapshot #VSTOR-144873
Date: Tue, 27 Oct 2026 11:21:00 +0200	[thread overview]
Message-ID: <88b4a044-f5e9-4e39-ad2e-89cf0dd4480d@virtuozzo.com> (raw)
In-Reply-To: <20261026193715.828224-2-den@openvz.org>

On 10/26/26 9:37 PM, Denis V. Lunev wrote:
> From: Denis V. Lunev <den@openvz.org>
> 
> discard_l2_subclusters() passes the discarded range down to the host
> file even when the cluster is still referenced by an internal snapshot.
> The active L2 table is copied before it is changed, so the snapshot
> metadata stays correct, but the host range under it is punched out and
> the snapshot reads zeroes there afterwards. qemu-img check finds nothing
> wrong.
> 
> Pass the discard down only for a cluster with QCOW_OFLAG_COPIED set,
> i.e. one owned by the active layer alone. A shared cluster gets only
> its active L2 bitmap updated, as a whole-cluster discard already does
> by dropping the refcount instead of punching the host file.
> 
> Cover it in iotest 271.
> 
> Fixes: 225b4de1249 ("qcow2: make subclusters discardable")
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> ---
>  [...]
Reviewed-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>

      reply	other threads:[~2026-10-27  9:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26 19:37 [PATCH hci-8.1 0/1] qcow2: fix guest TRIM destroying internal snapshot data #VSTOR-144873 Denis V. Lunev
2026-10-26 19:37 ` [PATCH hci-8.1 1/1] qcow2: fix subcluster discard punching data shared with a snapshot #VSTOR-144873 Denis V. Lunev
2026-10-27  9:21   ` Andrey Drobyshev [this message]

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=88b4a044-f5e9-4e39-ad2e-89cf0dd4480d@virtuozzo.com \
    --to=andrey.drobyshev@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=svt-core@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.