From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH storage 3/4] zfspool: export: skip hardcoded warning about no-preserve-encryption flag
Date: Wed, 18 Mar 2026 13:40:16 +0100 [thread overview]
Message-ID: <20260318124659.374754-4-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260318124659.374754-1-s.ivanov@proxmox.com>
currently `zfs send --no-preserve-encryption` prints:
`WARNING: no-preserve-encryption flag set, sending dataset $dataset without encryption`
if the dataset is encrypted.
This patch skips the warning to not clutter the output, as the choice
is made deliberately.
[0] https://github.com/openzfs/zfs/blob/d8c08a1cea6428fa37b3a6585150b10dedfd79b8/lib/libzfs/libzfs_sendrecv.c#L616
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
src/PVE/Storage/ZFSPoolPlugin.pm | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
index eaeeb9d..fcd7804 100644
--- a/src/PVE/Storage/ZFSPoolPlugin.pm
+++ b/src/PVE/Storage/ZFSPoolPlugin.pm
@@ -824,7 +824,17 @@ sub volume_export {
}
push @$cmd, '--', "$scfg->{pool}/$dataset\@$snapshot";
- run_command($cmd, output => $fd);
+ run_command(
+ $cmd,
+ output => $fd,
+ errfunc => sub {
+ my $line = shift;
+ if ($line !~ /^WARNING: no-preserve-encryption flag set, sending dataset/) {
+ print STDERR $line;
+ *STDERR->flush();
+ }
+ },
+ );
return;
}
--
2.47.3
next prev parent reply other threads:[~2026-03-18 12:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 12:40 [RFC docs/storage/zfsonlinux 0/4] allow replication/migration with zfs native encryption Stoiko Ivanov
2026-03-18 12:40 ` [PATCH zfsonlinux 1/4] cherry-pick patch for unencrypted send Stoiko Ivanov
2026-03-18 12:40 ` [PATCH storage 2/4] fix #2350: zfspool: send without preserving encryption Stoiko Ivanov
2026-03-18 12:40 ` Stoiko Ivanov [this message]
2026-03-18 12:40 ` [PATCH docs 4/4] storage: zfspool: add documention on encryption Stoiko Ivanov
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=20260318124659.374754-4-s.ivanov@proxmox.com \
--to=s.ivanov@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.