public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: "DERUMIER, Alexandre via pve-devel" <pve-devel@lists.proxmox.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Cc: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
Subject: Re: [pve-devel] [PATCH pve-storage 3/4] lvmplugin: add thin volume support for LVM external snapshots
Date: Wed, 12 Nov 2025 15:42:37 +0000	[thread overview]
Message-ID: <mailman.1020.1762962167.362.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <mailman.55.1760700908.362.pve-devel@lists.proxmox.com>

[-- Attachment #1: Type: message/rfc822, Size: 15289 bytes --]

From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH pve-storage 3/4] lvmplugin: add thin volume support for LVM external snapshots
Date: Wed, 12 Nov 2025 15:42:37 +0000
Message-ID: <26ecc0c948a752b367c870f5e67d3514977ee38b.camel@groupe-cyllene.com>

>>
>>diff --git a/src/PVE/Storage/Common.pm b/src/PVE/Storage/Common.pm
>>index 222dc76..1e5d4c6 100644
>>--- a/src/PVE/Storage/Common.pm
>>+++ b/src/PVE/Storage/Common.pm
>>@@ -170,7 +170,7 @@ C<$options> currently allows setting the
>>C<preallocation> value.
>> =cut
>> 
>> sub qemu_img_create_qcow2_backed {
>>-    my ($path, $backing_path, $backing_format, $options) = @_;
>>+    my ($path, $backing_path, $backing_format, $options, $thin) =
>>@_;
>> 
>>     my $cmd = [
>>         '/usr/bin/qemu-img',
>>@@ -188,7 +188,7 @@ sub qemu_img_create_qcow2_backed {
>>     my $opts = ['extended_l2=on', 'cluster_size=128k'];
>> 
>>     push @$opts, "preallocation=$options->{preallocation}"
>>-        if defined($options->{preallocation});
>>+        if defined($options->{preallocation}) && !$thin;
>>     push @$cmd, '-o', join(',', @$opts) if @$opts > 0;
>> 
>>     run_command($cmd, errmsg => "unable to create image");
>>diff --git a/src/PVE/Storage/LVMPlugin.pm
>>b/src/PVE/Storage/LVMPlugin.pm
>>index 0416c9e..dc5e648 100644
>>--- a/src/PVE/Storage/LVMPlugin.pm
>>+++ b/src/PVE/Storage/LVMPlugin.pm
>>@@ -575,7 +575,7 @@ sub lvrename {
>> }
>> 
>> my sub lvm_qcow2_format {
>>-    my ($class, $storeid, $scfg, $name, $fmt, $backing_snap, $size)
>>= @_;
>>+    my ($class, $storeid, $scfg, $name, $fmt, $backing_snap, $size,
>>$thin) = @_;
>> 
>>     $class->activate_volume($storeid, $scfg, $name);
>>     my $path = $class->path($scfg, $name, $storeid);
>>@@ -585,7 +585,9 @@ my sub lvm_qcow2_format {
>>     };
>>     if ($backing_snap) {
>>         my $backing_volname = get_snap_name($class, $name,
>>$backing_snap);
>>-        PVE::Storage::Common::qemu_img_create_qcow2_backed($path,
>>$backing_volname, $fmt, $options);
>>+        PVE::Storage::Common::qemu_img_create_qcow2_backed(
>>+            $path, $backing_volname, $fmt, $options, $thin,
>>+        );

don't add a new $thin parameter ,

"
    my $options = {
        preallocation =>
PVE::Storage::Plugin::preallocation_cmd_opt($scfg, $fmt),
    };
"

should return the correct preallocation (or no preallocation),  based
on $scfg . (where you should declare the "thin" option, and not drive)






[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  reply	other threads:[~2025-11-12 15:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251017112539.26471-1-joao.sousa@eurotux.com>
2025-10-17 11:25 ` [pve-devel] [PATCH pve-storage 1/4] pvestord: setup new pvestord daemon Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH pve-storage 2/4] storage: add extend queue handling Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH pve-storage 3/4] lvmplugin: add thin volume support for LVM external snapshots Tiago Sousa via pve-devel
2025-11-12 15:42   ` DERUMIER, Alexandre via pve-devel [this message]
2025-10-17 11:25 ` [pve-devel] [PATCH pve-storage 4/4] plugin: lvmplugin: add underlay functions Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH qemu-server 5/8] qmeventd: add block write threshold event handling Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH qemu-server 6/8] blockdev: add set write threshold Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH qemu-server 7/8] blockdev: add query-blockstats qmp command Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH qemu-server 8/8] blockdev: add underlay resize Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH pve-cluster 9/9] observe extend queue Tiago Sousa via pve-devel
2025-10-17 11:25 ` [pve-devel] [PATCH pve-manager 10/10] services: add pvestord service Tiago Sousa via pve-devel

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=mailman.1020.1762962167.362.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=alexandre.derumier@groupe-cyllene.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal