[pve-devel] [PATCH v3 storage 4/9] zfs pool plugin: implement method to get qemu blockdevice options

Fiona Ebner f.ebner at proxmox.com
Tue Jul 1 14:08:12 CEST 2025


Am 30.06.25 um 13:20 schrieb Fabian Grünbichler:
> On June 26, 2025 4:40 pm, Fiona Ebner wrote:
>> ZFS does not have a filesystem_path() method, so the default
>> implementation for qemu_blockdev_options() cannot be re-used. This is
>> most likely, because snapshots are currently not directly accessible
>> via a filesystem path in the Proxmox VE storage layer.
>>
>> Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
>> ---
>>
>> No changes in v3.
>>
>>  src/PVE/Storage/ZFSPoolPlugin.pm | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/src/PVE/Storage/ZFSPoolPlugin.pm b/src/PVE/Storage/ZFSPoolPlugin.pm
>> index 713d26f..4479fe4 100644
>> --- a/src/PVE/Storage/ZFSPoolPlugin.pm
>> +++ b/src/PVE/Storage/ZFSPoolPlugin.pm
>> @@ -162,6 +162,16 @@ sub path {
>>      return ($path, $vmid, $vtype);
>>  }
>>  
>> +sub qemu_blockdev_options {
>> +    my ($class, $scfg, $storeid, $volname) = @_;
>> +
>> +    my ($path) = $class->path($scfg, $volname, $storeid);
>> +
>> +    my $blockdev = { driver => 'host_device', filename => $path };
>> +
>> +    return $blockdev;
> 
> should we assert that $volname is a zvol?

Will add it in v2.




More information about the pve-devel mailing list