Use a common interface for find_free_diskname
We can use 'list_images' to get the desired volume IDs in 'find_free_diskname' for most plugins. For the two LVM plugins, 'list_images' potentially skips untagged volumes, so we keep the custom version. For the RBD plugin, 'list_images' is much more costly than the custom version, so we keep the custom version. Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
a573f66a2e
commit
a44c0147bc
@ -294,7 +294,7 @@ sub alloc_image {
|
||||
|
||||
my $volname = $name;
|
||||
|
||||
$volname = $class->zfs_find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
|
||||
$volname = $class->find_free_diskname($storeid, $scfg, $vmid, $fmt) if !$volname;
|
||||
|
||||
$class->zfs_create_zvol($scfg, $volname, $size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user