From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <pve-devel-bounces@lists.proxmox.com> Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 91AD61FF189 for <inbox@lore.proxmox.com>; Fri, 4 Apr 2025 13:37:53 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D86531D308; Fri, 4 Apr 2025 13:37:39 +0200 (CEST) Date: Fri, 4 Apr 2025 13:37:06 +0200 (CEST) From: =?UTF-8?Q?Fabian_Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> To: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>, "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com> Message-ID: <137183061.6481.1743766626183@webmail.proxmox.com> In-Reply-To: <3e516016a970e52e5a1014dbcd6cf9507581da74.camel@groupe-cyllene.com> References: <20250311102905.2680524-1-alexandre.derumier@groupe-cyllene.com> <mailman.965.1741689000.293.pve-devel@lists.proxmox.com> <476324959.4386.1743581433778@webmail.proxmox.com> <3e516016a970e52e5a1014dbcd6cf9507581da74.camel@groupe-cyllene.com> MIME-Version: 1.0 X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.6-Rev75 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.047 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [storage.pm] Subject: Re: [pve-devel] [PATCH v4 qemu-server 11/11] qcow2: add external snapshot support X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion <pve-devel.lists.proxmox.com> List-Unsubscribe: <https://lists.proxmox.com/cgi-bin/mailman/options/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=unsubscribe> List-Archive: <http://lists.proxmox.com/pipermail/pve-devel/> List-Post: <mailto:pve-devel@lists.proxmox.com> List-Help: <mailto:pve-devel-request@lists.proxmox.com?subject=help> List-Subscribe: <https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel>, <mailto:pve-devel-request@lists.proxmox.com?subject=subscribe> Reply-To: Proxmox VE development discussion <pve-devel@lists.proxmox.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" <pve-devel-bounces@lists.proxmox.com> > DERUMIER, Alexandre <alexandre.derumier@groupe-cyllene.com> hat am 04.04.2025 13:31 CEST geschrieben: > Hi Fabian, > > >>the first one is the renaming of a blockdev while it is used, which > >>is currently done like this: > >>-- "link" snapshot path to make it available under old and new name > >>-- handle blockdev additions/reopening/backing-file updates/deletions > >>on the qemu layer > >>-- remove old snapshot path link > >>-- if LVM, rename actual volume (for non-LVM, linking followed by > >>unlinking the source is effectively a rename already) > > >>I wonder whether that couldn't be made more straight-forward by doing > >>-- rename snapshot volume/image (qemu must already have the old name > >>open anyway and should be able to continue using it) > >>-- do blockdev additions/reopening/backing-file updates/deletions on > >>the qemu layer > > >>or is there an issue/check in qemu somewhere that prevents this > >>approach? if not, we could just introduce a "volume_snapshot_rename" > >>or extend rename_volume with a snapshot parameter.. > > I have done tests this last 2 days, and it's working fine indeed. (I > have done test with fio running during the snapshot rename/reopen, no > problem). > > so I'm using Storage::rename_volume now with snapshot param > > > >>the second thing that happens is deleting a snapshot volume/path, > >>without deleting the whole snapshot.. that one we could easily > >>support by extending volume_snapshot_delete by extending the $running > >>parameter (e.g., passing "2") or adding a new one to signify that all > >>the housekeeping was already done, and just the actual snapshot > >>volume should be deleted. this shouldn't be an issue provided all > >>such calls are guarded by first checking that we are using external > >>snapshots.. > > I have reused vdisk_free for this one, as I'm seeing a comment about > $running deprecation in Storage.pm > > # FIXME PVE 8.x remove $running parameter (needs APIAGE reset) > sub volume_snapshot_delete { > my ($cfg, $volid, $snap, $running) = @_; > > > vdisk_free have also a cluster_lock_storage, so for lvm , I think it's > better. > > (I have introduce a $snap param to vdisk_free, to only delete the > specific snapshot, and not the whole chain) vdisk_free is definitely wrong - you are not deleting a vdisk, just a snapshot.. I think this might be an argument for keeping $running ;) you can call the lock inside volume_snapshot_delete, right? _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel