From: Joaquin Varela <joaquinvarela@neatech.ar>
To: pve-devel@lists.proxmox.com
Cc: Joaquin Varela <joaquinvarela@neatech.ar>
Subject: [PATCH storage v2 5/7] zfsnvme: accept activation hints from storage API
Date: Sun, 2 Aug 2026 00:31:39 -0300 [thread overview]
Message-ID: <70a6d5b99742f420f8b8ffae9f8157fe1bd84e3d.1785636979.git.joaquinvarela@neatech.ar> (raw)
In-Reply-To: <cover.1785636979.git.joaquinvarela@neatech.ar>
Match the current activate_volume callback signature by accepting the
optional activation hints argument. Keep the existing snapshot rejection
semantics and add a focused compatibility test.
Signed-off-by: Joaquin Varela <joaquinvarela@neatech.ar>
---
src/PVE/Storage/ZFSNVMePlugin.pm | 10 +++++++++-
src/test/zfsnvme_test.pm | 16 ++++++++++++++++
2 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/src/PVE/Storage/ZFSNVMePlugin.pm b/src/PVE/Storage/ZFSNVMePlugin.pm
index 6513df0..21fa00d 100644
--- a/src/PVE/Storage/ZFSNVMePlugin.pm
+++ b/src/PVE/Storage/ZFSNVMePlugin.pm
@@ -772,7 +772,15 @@ sub qemu_blockdev_options($class, $scfg, $storeid, $volname, $machine_version, $
return { driver => 'host_device', filename => $path };
}
-sub activate_volume($class, $storeid, $scfg, $volname, $snapname, $cache = undef) {
+sub activate_volume(
+ $class,
+ $storeid,
+ $scfg,
+ $volname,
+ $snapname,
+ $cache = undef,
+ $hints = undef,
+) {
die "unable to activate snapshot from remote zfs storage\n" if $snapname;
my ($path) = $class->path($scfg, $volname, $storeid);
if (!-b $path) {
diff --git a/src/test/zfsnvme_test.pm b/src/test/zfsnvme_test.pm
index e06ac76..128ebf1 100644
--- a/src/test/zfsnvme_test.pm
+++ b/src/test/zfsnvme_test.pm
@@ -203,6 +203,22 @@ is_deeply(
'uses the QEMU host_device driver',
);
+eval {
+ PVE::Storage::ZFSNVMePlugin->activate_volume(
+ 'nvmetest',
+ $scfg,
+ 'vm-100-disk-0',
+ 'snapshot-with-hints',
+ {},
+ { 'guest-type' => 'qemu' },
+ );
+};
+like(
+ $@,
+ qr/unable to activate snapshot from remote zfs storage/,
+ 'activate_volume accepts the current storage API hints argument',
+);
+
my $lio_mock = Test::MockModule->new('PVE::Storage::LunCmd::LIO');
my @provider_args;
$lio_mock->redefine(
--
2.54.0.windows.1
next prev parent reply other threads:[~2026-08-02 3:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 3:31 [PATCH storage v2 0/7] add native ZFS over NVMe/TCP backend Joaquin Varela
2026-08-02 3:31 ` [PATCH storage v2 1/7] zfs: make LUN provider dispatch overridable Joaquin Varela
2026-08-02 3:31 ` [PATCH storage v2 2/7] zfs: add native NVMe/TCP storage backend Joaquin Varela
2026-08-02 3:31 ` [PATCH storage v2 3/7] zfsnvme: harden node preflight and storage teardown Joaquin Varela
2026-08-02 3:31 ` [PATCH storage v2 4/7] zfsnvme: make all-path loss policy explicit Joaquin Varela
2026-08-02 3:31 ` Joaquin Varela [this message]
2026-08-02 3:31 ` [PATCH storage v2 6/7] zfsnvme: accept short volume activation calls Joaquin Varela
2026-08-02 3:31 ` [PATCH storage v2 7/7] zfsnvme: restore ACLs before publishing target Joaquin Varela
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=70a6d5b99742f420f8b8ffae9f8157fe1bd84e3d.1785636979.git.joaquinvarela@neatech.ar \
--to=joaquinvarela@neatech.ar \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox