From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 4E6181FF138 for ; Mon, 15 Jun 2026 11:56:48 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2C4C3FAF7; Mon, 15 Jun 2026 11:56:48 +0200 (CEST) Date: Mon, 15 Jun 2026 11:56:13 +0200 From: Arthur Bied-Charreton To: pve-devel@lists.proxmox.com Subject: Re: [PATCH qemu-server] fix #7705: blockdev: detach backing chain on disk move/hot-unplug Message-ID: <33amip677utiqrzl6lovz6uk4cugclc263iul73cwbf5gl72d5@dkdvvvb7zkjm> References: <20260615073406.165751-1-a.bied-charreton@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260615073406.165751-1-a.bied-charreton@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1781517320828 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.764 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: TUEOWWYVKPPS2P4MF6OMXVZGHYA2WF26 X-Message-ID-Hash: TUEOWWYVKPPS2P4MF6OMXVZGHYA2WF26 X-MailFrom: a.bied-charreton@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Mon, Jun 15, 2026 at 09:34:06AM +0200, Arthur Bied-Charreton wrote: > When snapshots-as-volume-chains is enabled, moving or hot-unplugging a > disk that holds snapshots does not detach the snapshot volumes. > `Blockdev::detach` is called in both paths and only follows the `file` > child, so the snapshot nodes are left behind. Since they were added > explicitly via blockdev-add, they are also not GCed by QEMU and, as a > result, keep their source volumes open. > > Deleting one of those snapshots after the move does not detach the > orphaned block node because the disk is no longer attached to the > running VM. QEMU keeps the volume open for as long as the VM runs, and a > later attempt to remove the source fails with lvremove reporting the LV > as still in use. Forgot to mention that here but the bug report [0] includes a reproducer, should fail before the fix and work afterwards :) [0] https://bugzilla.proxmox.com/show_bug.cgi?id=7705