]> git.proxmox.com Git - pve-storage.git/commit
vdisk_list: only scan storages with the correct content type(s)
authorFabian Ebner <f.ebner@proxmox.com>
Fri, 18 Jun 2021 10:59:35 +0000 (12:59 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Jun 2021 09:21:45 +0000 (11:21 +0200)
commitd96b789aed8b6961d97cc1b5d3cc85cf4d2c5cf8
tree83e3cbd8ebeedcdec42f89efbbabf52b39b8e26f
parent6a4545601b874ff3d003855ecbad8f5315ae812e
vdisk_list: only scan storages with the correct content type(s)

The enabled check in the lower loop is now redundant and can be removed.

If storeid is provided, initialize the result hash accordingly, mainly for
backwards compatibility (needed by a caller in pve-manager's Ceph/Pools.pm and
the migration code in pve-container and qemu-server), but it also is less
surprising in general.

Remaining vdisk_list users that do not specify a content type are:
    1. pve-manager's Pool/Ceph.pm, but the content type for RBD can only be
       rootdir and images, so the storage is scanned (if enabled, same as
       before).
    2. pve-container migration
    3. qemu-server migration
For the latter two, it's planned to enforce content type, so the change is fine
too.

This also means that for iscsi(direct) plugins with content type 'none', i.e.
"use LUNs directly" does not return the list of images anymore, but that was
rather a bug anyways as they're not virtual disks then:
    0.0.0.scsi-36001405b8f2772e13a04b8e9390db13d
All of the remaining callers not using content types (see above) are fine with
that change too.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
PVE/Storage.pm