]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/varlink-io.systemd.MachineInstance: add ReplaceStorage method
authorChristian Brauner <brauner@kernel.org>
Fri, 8 May 2026 08:42:55 +0000 (10:42 +0200)
committerChristian Brauner <brauner@kernel.org>
Tue, 12 May 2026 20:54:07 +0000 (22:54 +0200)
commit3063448b51b4fcfcdd51f015db9260292ce70fab
tree8a07bbbced166825c362070afdfc792d10da61ac
parent8dc5dbe3c01e937ef79c9bc63ca1051ae22447ad
shared/varlink-io.systemd.MachineInstance: add ReplaceStorage method

Define the IDL for io.systemd.MachineInstance.ReplaceStorage, a
runtime hot-swap of an already-attached storage volume's backing
file. The signature mirrors AddStorage minus the 'config' field
because the device frontend (virtio-blk, virtio-scsi, nvme, scsi-cd)
does not change — only the backing file behind it.

The implementation lives in vmspawn (next commit) and uses QMP
blockdev-reopen to swap the file child of the existing format node.
The reused error vocabulary (NoSuchStorage, StorageImmutable,
NotConnected, plus the generic errno path) covers every failure
mode; no new errors are added.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
src/shared/varlink-io.systemd.MachineInstance.c