microvm disk support code is messy #351

Open
opened 2025-09-18 14:45:37 +00:00 by raito · 0 comments
Owner

MicroVM disk support code has one volume type: zvol with journal, those are a couple of zvols with different block sizes property to accommodate the general purpose VM usecase and have nice performance properties.

The code is very ad-hoc and it's very much desireable to support more volume type, e.g. a Garage should probably have a data volume type with no journal.

We should split off all that code into its own file and rework a bit some of the deep technical debt in a way that separates:

  • elaboration of a high level request for disk
  • desugarification towards a low level list of disks

One important thing to watch for is the impedence mismatch between ordering disks and naming disks.

  • High level APIs makes use of attrsets and does not order.
  • Low level APIs receive a list.

We should perhaps consider to use list everywhere to avoid this problem and rely on module system mechanisms to order things.

MicroVM disk support code has one volume type: zvol with journal, those are a couple of zvols with different block sizes property to accommodate the general purpose VM usecase and have nice performance properties. The code is very ad-hoc and it's very much desireable to support more volume type, e.g. a Garage should probably have a data volume type with no journal. We should split off all that code into its own file and rework a bit some of the deep technical debt in a way that separates: - elaboration of a high level request for disk - desugarification towards a low level list of disks One important thing to watch for is the impedence mismatch between ordering disks and naming disks. - High level APIs makes use of attrsets and does not order. - Low level APIs receive a list. We should perhaps consider to use list everywhere to avoid this problem and rely on module system mechanisms to order things.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
afnix/infra#351
No description provided.