From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH storage 3/3] btrfs: volume export: fix command for incremental stream
Date: Fri, 21 Feb 2025 16:41:11 +0100 [thread overview]
Message-ID: <20250221154111.73194-4-f.ebner@proxmox.com> (raw)
In-Reply-To: <20250221154111.73194-1-f.ebner@proxmox.com>
The subvolume itself cannot be included if there is a base snapshot
or the command would fail with e.g.
> ERROR: subvolume /mnt/btrfs/images/400/vm-400-disk-0 is not read-only
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
src/PVE/Storage/BTRFSPlugin.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/BTRFSPlugin.pm b/src/PVE/Storage/BTRFSPlugin.pm
index b0f732b..2e58f60 100644
--- a/src/PVE/Storage/BTRFSPlugin.pm
+++ b/src/PVE/Storage/BTRFSPlugin.pm
@@ -780,7 +780,8 @@ sub volume_export {
}
push @$cmd, '--';
if (ref($with_snapshots) eq 'ARRAY') {
- push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*), $path;
+ push @$cmd, (map { "$path\@$_" } ($with_snapshots // [])->@*);
+ push @$cmd, $path if !defined($base_snapshot);
} else {
dir_glob_foreach(dirname($path), $BTRFS_VOL_REGEX, sub {
push @$cmd, "$path\@$_[2]" if !(defined($snapshot) && $_[2] eq $snapshot);
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-02-21 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 15:41 [pve-devel] [PATCH-SERIES storage 0/3] small fixes towards btrfs incremental export/import Fiona Ebner
2025-02-21 15:41 ` [pve-devel] [PATCH storage 1/3] volume export: fix handling of snapshot list Fiona Ebner
2025-02-21 15:41 ` [pve-devel] [PATCH storage 2/3] btrfs: volume import: fix check for presence of base snapshot Fiona Ebner
2025-02-21 15:41 ` Fiona Ebner [this message]
2025-04-06 19:19 ` [pve-devel] applied: [PATCH-SERIES storage 0/3] small fixes towards btrfs incremental export/import Thomas Lamprecht
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=20250221154111.73194-4-f.ebner@proxmox.com \
--to=f.ebner@proxmox.com \
--cc=pve-devel@lists.proxmox.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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal