]> git.proxmox.com Git - pve-storage.git/commit
RBD plugin: path: conditionalize get_rbd_dev_path() call
authorFiona Ebner <f.ebner@proxmox.com>
Wed, 31 Aug 2022 08:50:54 +0000 (10:50 +0200)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 13 Sep 2022 07:55:56 +0000 (09:55 +0200)
commite8e477112f578c1c9ecede474fc1424ad3262e04
tree6bc1b91d10c3d6cefceebb51824b28cfa2a4a1cb
parentc560cb58a5b92ce436eea34554b5d091d2acacde
RBD plugin: path: conditionalize get_rbd_dev_path() call

The return value of get_rbd_dev_path() is only used when $scfg->{krbd}
evaluates to true and the function shouldn't have any side effects
that are needed later, so the call can be avoided otherwise.

This also saves a RADOS connection and command with configurations for
external clusters with krbd disabled.

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