Skip to main content

Module drive

Module drive 

Source
Expand description

/drives/{id} PUT and PATCH bodies.

Per 21-api-compat-matrix.md /drives/{id} PUT:

  • drive_id^[A-Za-z0-9_]{1,64}$ (DriveId newtype).
  • path_on_hostSafePath (1024-byte cap, no NUL).
  • cache_typeUnsafe | Writeback.
  • io_engineSync | Async.
  • partuuid — optional; when is_root_device true, threaded into root=PARTUUID=.
  • socket (vhost-user) — A: accept-and-warn at config-load.

Diffs from upstream are intentionally absent at this layer; the deviations are enforced at the controller / VMM stage (e.g. vhost-user socket warning).

Structs§

DriveConfig
Validated /drives/{id} PUT body.
DrivePatch
Validated /drives/{id} PATCH body.
RawDriveConfig
Raw /drives/{id} PUT body off the wire.
RawDrivePatch
Raw /drives/{id} PATCH body. Every mutable field optional.

Enums§

CacheType
Caching policy for the block device. Mirrors upstream verbatim.
IoEngine
Block-device IO engine. Sync = blocking; Async = tokio::task::spawn_blocking.