[pve-devel] applied: [PATCH v2 storage 1/3] rbd: centralize rbd path concatenation

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Apr 12 14:39:51 CEST 2021

On 07.04.21 16:22, Aaron Lauterer wrote:
> The <pool>/<image> paths are needed in quite a lot of places. Having one
> single place where they are created helps to reduce duplicate code and
> makes it easier to introduce new features.
> The 'add_pool_to_disk' sub was already doing that but the name was not
> really fitting. This commit renames it to the more general
> 'get_rbd_path' and changes the second parameter to the more widely used
> $volume instead of $disk.
> Furthermore, all occurences where "$pool/$volume" has been concatenated
> have been replaced with a call to get_rbd_path.
> Plus some minor code style cleanups for long function calls that were
> touched.
> Signed-off-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
>  PVE/Storage/RBDPlugin.pm | 46 +++++++++++++++++++++++-----------------
>  1 file changed, 27 insertions(+), 19 deletions(-)

applied, thanks!

I made the $volume optional too in a follow-up, so that it could be reused
for an additional case.

More information about the pve-devel mailing list