all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [RFC qemu-server/storage 0/2] refactor of volume_id classification
@ 2026-07-28 12:22 Thomas Ellmenreich
  2026-07-28 12:22 ` [PATCH storage 1/2] add subroutine to classify volume ids Thomas Ellmenreich
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Ellmenreich @ 2026-07-28 12:22 UTC (permalink / raw)
  To: pve-devel; +Cc: Thomas Ellmenreich

Refactor of volume_id classification
====================================

While developing this: [0] patch series, I refactored all the checks for
volume id's as absolute paths into their own subroutine. The original series
was then dropped in favour of a quicker fix: [1]. This series revives the
refactor without the fix and, unlike the original series creates a new
classify_volume_id subroutine, as @Fiona Ebener mentioned here: [2].

Overview
--------

As previously mentioned, a new classify_volume_id subroutine has been
introduced, which can then be used to determine the type of volume id. This
type can be one of:

> 'none', 'cdrom', 'absolute', 'volume'

The subroutine and constants are exported by the pve-storage package and
used in the qemu-server package.

Open Questions
--------------

- The classify subroutine currently throws an error if the volume id does not
  match any of the patterns (when 'noerr' is not selected). I'm not sure if
  this is the correct way to implement a classification method, given that all
  my uses enable the noerr option. That said, the case where an error is thrown
  should be very unlikely and would point to an error that should be fixed.

- I have decided to only use the new function in the QemuServer.qm module,
  since other uses can then be added incrementally. Does this approach make
  sense?

[0]: https://lore.proxmox.com/pve-devel/20260722095251.89606-1-t.ellmenreich@proxmox.com/T/#t
[1]: https://lore.proxmox.com/pve-devel/20260724081611.11254-1-f.ebner@proxmox.com/
[2]: https://lore.proxmox.com/pve-devel/0b4272e1-3634-4fdd-b79f-6b077dd387d5@proxmox.com/


pve-storage:

Thomas Ellmenreich (1):
  add subroutine to classify volume ids

 src/PVE/Storage.pm        | 21 +++++++++++++++++++++
 src/PVE/Storage/Plugin.pm | 25 +++++++++++++++++++++++++
 2 files changed, 46 insertions(+)


qemu-manager:

Thomas Ellmenreich (1):
  use new classify_volume_id subroutine

 src/PVE/QemuServer.pm       | 39 ++++++++++++++++++++++++-------------
 src/PVE/QemuServer/Drive.pm |  6 ++++++
 2 files changed, 32 insertions(+), 13 deletions(-)


Summary over all repositories:
  4 files changed, 78 insertions(+), 13 deletions(-)

-- 
Generated by murpp 0.12.0




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-07-31 10:21 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 12:22 [RFC qemu-server/storage 0/2] refactor of volume_id classification Thomas Ellmenreich
2026-07-28 12:22 ` [PATCH storage 1/2] add subroutine to classify volume ids Thomas Ellmenreich
2026-07-31 10:13   ` Fiona Ebner
2026-07-31 10:21     ` Fiona Ebner
2026-07-28 12:22 ` [PATCH qemu-server 2/2] use new classify_volume_id subroutine Thomas Ellmenreich
2026-07-31 10:13   ` Fiona Ebner
2026-07-28 13:30 ` [RFC qemu-server/storage 0/2] refactor of volume_id classification Max R. Carrara
2026-07-28 14:29   ` Thomas Ellmenreich
2026-07-29  8:27     ` Max R. Carrara
2026-07-31  9:56     ` Fiona Ebner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal